修订版 | 68d2ff349466d7bbcf6e4065fb5da40f2fbd8ca1 (tree) |
---|---|
时间 | 2022-09-19 18:11:50 |
作者 | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
This is the companion Rmd code of the R code to automatically generate a report from Shiny.
@@ -0,0 +1,18 @@ | ||
1 | +--- | |
2 | +title: "Dynamic report" | |
3 | +output: word_document | |
4 | +params: | |
5 | + n: NA | |
6 | +--- | |
7 | + | |
8 | +```{r} | |
9 | +# The `params` object is available in the document. | |
10 | +params$n | |
11 | +``` | |
12 | + | |
13 | +A plot of `params$n` random points. | |
14 | + | |
15 | +```{r} | |
16 | +plot(rnorm(params$n), rnorm(params$n)) | |
17 | +``` | |
18 | + |