我有一个非常长的R代码,需要大约2-3个小时才能运行并且编织为HTML。然而即使有轻微的错误或警告..编织中止..在下面的例子中它由于savehistory错误而这样做了。
processing file: model_v64.Rmd
|...................... | 33%
ordinary text without R code
|........................................... | 67%
label: unnamed-chunk-1 (with options)
List of 1
$ echo: logi TRUE
Quitting from lines 21-278 (model_v64.Rmd)
**Error in .External2(C_savehistory, file) : no history available to save**
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> savehistory
Execution halted
我们有什么方法可以
谢谢,Manish
答案 0 :(得分:3)
设置块选项error = TRUE
以显示错误,而不是暂停R:
knitr::opts_chunk$set(error = TRUE)