0 votes
1 view
in R Programming by (5k 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
by (24.7k points)
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 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...