Back
I have a .Rpres file in RStudio. I would like to include code, but not have it run (I am only showing the code to explain how it works). Is it possible to accomplish this (and ensure that it will not produce errors because it is not running)?
To get the desired result, you need to include eval=FALSE in the knitr code chunk options? e.g.:
```{r eval=FALSE} print("Don't run me") ```
```{r eval=FALSE}
print("Don't run me")
```
If you want to learn more about R programming watch this tutorial on Introduction to Data Science with R
31k questions
32.8k answers
501 comments
693 users