【发布时间】:2016-03-28 03:51:39
【问题描述】:
我在使用简单的 ggplot 命令时遇到了意外错误,我已经用尽了所有的网络搜索来找到类似的问题。
qplot(hp,mpg,data=mtcars)
Error in list2env(members, envir = e) :
names(x) must be a character vector of the same length as x
同样适用于使用 ggplot...
ggplot(mtcars, aes(hp,mpg)) + geom_point()
Error in list2env(members, envir = e) :
names(x) must be a character vector of the same length as x
我过去从未遇到过这个问题,虽然我在使用 ggplot 一段时间后。
我正在运行 R 3.1.1,任何帮助将不胜感激!
更新:会话信息
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_2.0.0
loaded via a namespace (and not attached):
[1] digest_0.6.8 htmltools_0.2.6 httpuv_1.3.3 jsonlite_0.9.19 mime_0.4
R6_2.1.1 Rcpp_0.12.2 tools_3.1.1 xtable_1.8-0
干杯
【问题讨论】:
-
你的 sessionInfo()..update ggplot2 是什么
-
使用 sessionInfo() 更新帖子
-
对不起,我想我在加载 ggplot 之前使用了 sessionInfo(),试图重新安装它....更新了上面的 Sessioninfo.. 我仍然遇到同样的错误。跨度>
-
代码适用于 ggplot 1.0.1,但我知道它刚刚得到了更新,并且 hadley 说事情可能会中断(显然他不喜欢向后兼容)。我会更新,看看我是否遇到与@Anes_thetize 相同的问题
-
更新 ggplot2 后,这些命令对我来说工作正常。
标签: r ggplot2 environment-variables rstudio environment