luckButtered luckButtered -4 years ago 188
R Question

Include code that does not run in Rpresentation Markdown

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

Answer Source

Have you tried eval=FALSE in the knitr code chunk options? e.g.:

```{r eval=FALSE}
print("Don't run me")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download