0

I'm trying to knit chunks that contain errors into an HTML file but without printing the errors — just the chunk.

While trying to solve this, I learned interesting information such as :

I also found :

and

While this was useful information for further analysis, I still don't get how to print the chunk without getting the error.

Lets' say I want the following code to be printed in the HTML file, but not the error :

Actual code looks like this (keep in mind that I erased the initial part of the R code so you can see the code) :

include=TRUE, echo=TRUE, message=FALSE, warning=FALSE, error=TRUE, results='hide', warn.conflicts=FALSE}

ggplot(df, aes(y = ABC, x = 123)) +
  geom_point()

enter image description here

duckmayr
  • 16,303
  • 3
  • 35
  • 53
Luis
  • 61
  • 4
  • 9

0 Answers0