Explore Courses Blog Tutorials Interview Questions
0 votes
in R Programming by (5.3k points)

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)?

1 Answer

0 votes
edited by

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") 


If you want to learn more about R programming watch this tutorial on Introduction to Data Science with R

Related questions

Browse Categories