I would like to include a code block with an error
ggplot(Indometh, x= time, y = conc) +
geom_smooth() +
geom_point() +
labs(title = "Indomethacin Concentration Over Time \n After a Single Oral Dose",
x = "Time in Hours",
y = "Concentration in \U00B5g/mL")
and ask the students to interpret the error message (with help from Google), find the error, and fix it.
With the error in place, the Rmd will not knit.
While I could comment out the code, and ask them to remove the hashtags and run it, is there a way to ignore code chunk errors when knitting?
---
title: "Preserve Error"
output: html_document
---
Bla Bla Bla
```{r error=TRUE}
library(ggplot2)
ggplot(Indometh, x= time, y = conc) +
geom_smooth() +
geom_point() +
labs(title = "Indomethacin Concentration Over Time \n After a Single Oral Dose",
x = "Time in Hours",
y = "Concentration in \U00B5g/mL")
```
Bla Bla Bla