【发布时间】:2011-08-29 07:07:51
【问题描述】:
我在 R 中加载 ggplot2 库时遇到问题。下面是我输入的代码。有人对如何使这项工作有任何想法吗?
> library(ggplot2)
Error in get(x, envir = this, inherits = inh) :
unused argument(s) (envir = this, inherits = inh)
Error : unable to load R code in package 'ggplot2'
Error: package/namespace load failed for 'ggplot2'
编辑 1:更多信息
> sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] quantmod_0.3-15 TTR_0.20-2 xts_0.8-0 zoo_1.6-5 Defaults_1.1-1
[6] reshape2_1.1 proto_0.3-9.2 reshape_0.8.4 plyr_1.5.2
loaded via a namespace (and not attached):
[1] lattice_0.19-26 stringr_0.4 tools_2.13.0
编辑2:
我尝试使用的 ggplot2 版本是 0.8.9。当我调用回溯函数时,我得到以下结果:
> traceback()
2: stop(gettextf("package/namespace load failed for '%s'", package),
call. = FALSE, domain = NA)
1: library(ggplot2)
【问题讨论】:
-
我可能帮不了你,但那些人可能会想要更多的细节;特别是运行 sessionInfo() 的输出将是一个好的开始。
-
好吧,我会用这些信息更新!
-
您要加载哪个版本的 ggplot2?
library失败后traceback()的输出是什么? -
您是否尝试过重新安装软件包?
-
@Joshua Ulrich:我已经添加了请求的信息。我也有@Manoel,实际上我重新安装了 R 本身。不过我会再试一次。