使用
devtools::check(document = FALSE, env_vars="_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_= TRUE")
似乎没有正确设置env_vars
,因为我获得的(相关)输出是:
Setting env vars --------------------------------------------
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_: FALSE
: _R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_= TRUE
我希望如果说明中的规范是正确的,我会看到:
Setting env vars --------------------------------------------
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_ : FALSE
_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_ : TRUE
答案 0 :(得分:1)
<强>用法强>
check_for_cran(path = ".", email = NULL, check_args = "--as-cran",
env_vars = c(`_R_CHECK_FORCE_SUGGESTS_` = "true",
`_R_CHECK_CRAN_INCOMING_USE_ASPELL_` = "true"), platforms = NULL, ...)
你需要将TRUE用双引号,变量用单引号,并在整个事物周围加上一个c()。
所以现在我重做OP调用:
devtools::check(document = FALSE, env_vars=c(`_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_`= "TRUE"))
并获取
Setting env vars --------------------------------------------
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_ : FALSE
_R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_: TRUE