How to show the error message in Knit html output?

Hello, I am writing codes in .Rmd file, and I want to see the output file in Knit html form. I have a wrong code and want to show it is wrong.

Error: unexpected input in "3 <- 3 & 5 !"

I want to show what it is in my output. How should I do?

Include this option for the chunk:

```{r error = TRUE}
3 <- 3 & 5 !
```

See here for more information:

(emphasis mine)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.