How to show errors in R-code in an blogdown article
When it comes to programming errors are a natural part of it. Sometimes you want to show such an error and then you want to show how to remove that error.
But if you have an error within your R-code chunk blogdown stops processing your article.
My first try was to catch the error with tryCatch()
|
|
|
|
But that’s a little clumsy and there is a simpler way:
Just use the option error = TRUE
for your code chunk:
|
|
|
|