gpt4 book ai didi

R CMD 检查 "Found the following assignments to the global environment:"

转载 作者:行者123 更新时间:2023-12-01 23:48:09 25 4
gpt4 key购买 nike

关闭。这个问题需要details or clarity .它目前不接受答案。












想改善这个问题吗?通过 editing this post 添加详细信息并澄清问题.

6年前关闭。




Improve this question




运行 R CMD check在我的包裹上,我收到以下警告消息:

Found the following assignments to the global environment:
File ‘SciencesPo/R/describe.R’:
assign(as.character(substitute(data)), dataset, pos = 1)

我试图通过添加一个环境来使其静音 here使用 envir = .SciencesPoEnv , 和 envir = .GlobalEnv ,但收到了相同的消息。

有谁知道我该如何解决它?

最佳答案

这应该做:

#' function loading results in global environment
#' @param pos defaults to 1 which equals an assingment to global environment
assign_to_global <- function(pos=1){
assign("sentence", "That was easy.", envir=as.environment(pos) )
}

关于R CMD 检查 "Found the following assignments to the global environment:",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28180989/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com