-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreport.Rmd
56 lines (50 loc) · 1.1 KB
/
report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: Three sets of random numbers
author: You
output: html_document
---
```{r, here-i-am, include = FALSE}
here::i_am(
"report.Rmd"
)
```
```{r, load-random-numbers, include = FALSE}
#! TO DO:
#! read random_numbers1 from output directory
random_numbers1 <- readRDS(
here::here("output/random_numbers1.rds")
)
#! TO DO:
#! read random_numbers2 from output directory
random_numbers2 <- readRDS(
here::here("output/random_numbers2.rds")
)
#! TO DO:
#! read random_numbers3 from output directory
random_numbers3 <- readRDS(
here::here("output/random_numbers3.rds")
)
```
# A scatter plot
```{r, random-numbers1-histogram}
#| fig.cap = "Scatter plot of random numbers",
#| echo = FALSE
random_numbers3_quantiles <- quantile(
random_numbers3,
seq(0, 1, length = 5)
)
random_numbers3_breaks <- as.numeric(
cut(
random_numbers3,
breaks = random_numbers3_quantiles,
include.lowest = TRUE
)
)
colors <- RColorBrewer::brewer.pal(4, "Set1")
point_color <- colors[random_numbers3_breaks]
plot(
x = random_numbers1, y = random_numbers2,
col = point_color,
bty = "n", pch = 19
)
```