I write a report in R Markdown in which I do not want to print any of my R-code in the main part of the report - I just want to show graphs, calculate the variables that I insert in the inline text, and sometimes show a small amount of raw R output . So I am writing something like this:
In the following plot, we see that blah blah blah:
```{r snippetName, echo=F}
plot(df$x, df$y)
```
Now...
This is all good and good. But I would also like to provide an R-code at the end of the document so that anyone is curious to see how it was created. Right now I have to manually write something like this:
Here is snippet 1, and a description of what section of the report
this belongs to and how it used:
```{r snippetName, eval=F}
```
Here is snippet 2:
```{r snippetTwoName, eval=F}
```
<!-- and so on for 20+ snippets -->
, . , ? , - :
```{r snippetName, echo=F, comment="This is snippet 1:"}
```
- , :
This is snippet 1:
```{r snippetName, eval=F}
```
, - - .Rmd, - (, , - , pandoc?), , - .
. , , . , , , ( , ?). 20+ .