gpt4 book ai didi

r - 没有找到时创建一个包名称

转载 作者:行者123 更新时间:2023-12-04 20:09:59 24 4
gpt4 key购买 nike

每次更新R必须发生一些事情......无论如何,这次(显然仅适用于 data.table ,其他包装如 ggplot2 以及所有由它导入的都很好)我得到了这个:

> library("data.table", lib.loc="C:/Program Files/R/R-3.0.2/library")
data.table 1.8.10 For help type: help("data.table")
> detach("package:data.table", unload=TRUE)
Warning messages:
1: In FUN(X[[2L]], ...) :
Created a package name, ‘2013-10-04 18:33:03’, when none found
2: In FUN(X[[2L]], ...) :
Created a package name, ‘2013-10-04 18:33:03’, when none found
3: In FUN(X[[2L]], ...) :
Created a package name, ‘2013-10-04 18:33:03’, when none found
4: In FUN(X[[2L]], ...) :
Created a package name, ‘2013-10-04 18:33:03’, when none found
5: In FUN(X[[2L]], ...) :
Created a package name, ‘2013-10-04 18:33:03’, when none found
6: In FUN(X[[2L]], ...) :
Created a package name, ‘2013-10-04 18:33:03’, when none found

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.0.2

卸载软件包并使用 Rtools 从源代码重新安装时,输出完全相同。他们只是 warnings我知道,但我很好奇/有点担心这是否会在以后暗示其他事情。

编辑:与 Rcpp以及(30 条警告),与 data.table 不同, Rpcc不管用:
> evalCpp('2 * M_PI')
Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput, :
SET_VECTOR_ELT() can only be applied to a 'list', not a 'symbol'

最佳答案

警告由 getPackageName() 函数在调用时发送,例如在 data.table 命名空间的 parent.env 上。

这是调用堆栈的相关部分:

# where 3: sapply(where, getPackageName)
# where 4: findClass(what, classWhere)
# where 5: .removeSuperclassBackRefs(cl, cldef, searchWhere)
# where 6: methods:::cacheMetaData(ns, FALSE, ns)
# where 7: unloadNamespace(pkgname)

...
# where 11: tryCatch(unloadNamespace(pkgname), error = function(e) warning(gettextf("%s namespace cannot be unloaded:\n ",
# sQuote(pkgname)), conditionMessage(e), call. = FALSE,域 = NA))
# where 12: detach("package:data.table", unload = TRUE)

例如,尝试:
getPackageName(parent.env(getNamespace('data.table')))


findClass('data.frame', getNamespace('data.table'))

它已在 R-devel 中修复(未经我本人验证,但我相信 J. Chambers 对此)。

关于r - 没有找到时创建一个包名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19187466/

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