这是一个后续到这样一个问题:R CMD BATCH or Rscript with stop on error为什么R CMD BATCH中的行为对于选项(error = utils :: dump.frames)有所不同?
如果我.Rprofile我有
options(error = utils::dump.frames)
那么R CMD批量不能停止错误。
如果我在含有以下内容的文件运行R CMD BATCH
:
stop("I really mean stop!")
cat("no, I dont want this printed")
的cat
命令仍在执行。
但是当我在该文件上做source
时,R停止。为什么这是真的,我如何使行为一致?
你是从RStudio还是R shell安装了'.Rprofile'的错误处理程序的“源代码”? –