I am using Rmarkdown
and Knitr
using Rstudio.
The following both print script and output to html.
```{r}
summary(cars)
```
However the following will only print the output, that is embedded plot.
```{r, echo=FALSE}
plot(cars)
```
I have situation different than above, I want to present the script but should not run in html as this will take very long time (hours if not days) to run. So I just did was put comment sign.
```{r}
#summary(cars)
```
But I need a better way to do this - Is there any better way presenting script without running it.
question from:
https://stackoverflow.com/questions/25837990/preventing-a-chunk-run-in-rmarkdown 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…