Rmarkdown - Run code and display errors in a document

I get an error message when the code runs below expected - I would like it to be launched and displayed in pdf, however the error returns to r, and the code does not start.

{r, warning=TRUE} library(survey) debug(withReplicates.svyrep.design)

I tried warning=TRUE, but it does not work.

How can I get the error displayed in the document?

+4
source share
1 answer

Add error=TRUEto the fragment parameters. This will terminate the script with an error that appears on the output.

+11
source

Source: https://habr.com/ru/post/1618920/


All Articles