我在检查 R 源包时遇到问题。在我的文档文件 (*.Rd) 中有一个示例部分,只要此部分为空白,我的检查就会通过,但当此部分不为空白时,无论我输入什么,检查都会失败。即使是此示例中的注释或宏 \dontrun{...} 也会导致失败。有人知道如何解决这个问题吗?
以下是该消息的快照:
* checking data for ASCII and uncompressed saves ... OK
* checking examples ... ERROR
Running examples in ‘rActus-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: riskfactors
> ### Title: Create a new riskfactor object
> ### Aliases: RiskFactors.rActus YieldCurve.rActus YieldCurve
> ### StockIndex.rActus StockIndex
> ### Keywords: datasets
>
> ### ** Examples
>
> # test
>
>
>
> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Warning in getRiskFactor(code = code, envir = object) :
risk factor not found, instead looking for default one
Error in proc.time() - get(".ptime", pos = "CheckExEnv") :
non-numeric argument to binary operator
Calls: <Anonymous>
Execution halted
提前致谢。