リビジョン | aa22023e835eeb73e75acf6fe08e34c7ffe16e5e (tree) |
---|---|
日時 | 2021-03-15 19:39:06 |
作者 | Lorenzo Isella <lorenzo.isella@gmai...> |
コミッター | Lorenzo Isella |
A short rmarkdown file illustrating how to use variables calculated in R inside the main text of a document.
@@ -0,0 +1,19 @@ | ||
1 | +--- | |
2 | +title: "Country Focus in the Year x." | |
3 | +output: word_document | |
4 | +--- | |
5 | + | |
6 | + | |
7 | +```{r seq, echo=FALSE, eval=T} | |
8 | +library(tidyverse) | |
9 | +x <- tibble(value=seq(2000,2020)) %>% | |
10 | + pull(value) %>% | |
11 | + max() | |
12 | + | |
13 | +y <- x*2 | |
14 | + | |
15 | +``` | |
16 | + | |
17 | +Section | |
18 | + | |
19 | +The number of years is `r x` and `r y`. |