【问题标题】:Rmarkdown - Run code and display errors in documentRmarkdown - 运行代码并在文档中显示错误
【发布时间】:2016-03-12 07:19:33
【问题描述】:

运行下面的代码时,我收到一条预期的错误消息 - 我希望运行它并显示在 pdf 中,但是错误在 r 中返回并且代码不运行。

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

我试过warning=TRUE 但这不起作用。

如何获取文档中显示的错误信息?

【问题讨论】:

    标签: r markdown rstudio knitr r-markdown


    【解决方案1】:

    error=TRUE 添加到块选项中。这将导致脚本运行完成,并在输出中显示错误。

    【讨论】:

      猜你喜欢
      • 2022-01-18
      • 2012-04-20
      • 1970-01-01
      • 1970-01-01
      • 2012-10-16
      • 1970-01-01
      • 2015-11-11
      • 2017-12-31
      • 1970-01-01
      相关资源
      最近更新 更多