CRAN policy on use of global variables

心不动则不痛 提交于 2020-01-15 05:24:08

问题


In the CRAN repository policy documentation, it is explicitly stated: "Packages should not modify the global environment (user’s workspace)."

When I run

R CMD check 

via

devtools::check(), 

it merely states "no visible binding for global variable x." as a NOTE rather than a WARNING.

CRAN will not accept user-contributed packages containing ERRORS and/or WARNINGS. My package has none of these. NOTES, on the other hand, are admissible.

This said, I have a few

assign(..., envir = .GlobalEnv) 

instances in a function within my R package which I intend to submit to CRAN.

Given that globals are frowned upon, the following questions arise:

(1) Why doesn't R CMD check issue WARNINGS regarding global variables?

(2) Will the CRAN maintainers complain to me regarding the use of globals in my package?

来源:https://stackoverflow.com/questions/55604073/cran-policy-on-use-of-global-variables

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!