- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在使用一个简单的 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(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
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
最佳答案
当我将 R 更新到 3.2.3 时它有效
这需要一些管理请求(工作机器),但现在都已排序。
sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
LC_MONETARY=English_Australia.1252
[4] 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] labeling_0.3 colorspace_1.2-6 scales_0.3.0 plyr_1.8.3
tools_3.2.3 gtable_0.1.2 Rcpp_0.12.2 grid_3.2.3
[9] munsell_0.4.2
关于r - 神秘的 R ggplot 错误 - list2env(成员,envir = e)中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34406410/
我在使用R中的包加载数据时遇到了这个错误,在这个包中,使用了pakcage rJava。 每次运行一个函数,报错是 Error in ls(envir = envir, all.names = pri
当我尝试使用“XLConnect”包将 Excel 文件读入 R 时,以下错误不断出现,不一致。 Error in ls(envir = envir, all.names = private) : i
我是 R 新手,所以如果问题有点愚蠢请原谅我。我正在尝试为值函数迭代编写一个简单的 while 循环。我的函数(optim.routine)使用求解器 ipoptr。这是我的代码: di.eps &
从命令行或脚本使用 jags.parallel 效果很好。我可以从 http://www.inside-r.org/packages/cran/R2jags/docs/jags 运行这个修改后的示例就
我尝试使用 predict() 函数通过将变量传递到模型中来预测 R 中的值。 我收到以下错误: Error in eval(predvars, data, env) : numeric 'env
为环境中的名称赋值和设置变量的环境有什么区别?我无法从文档中弄清楚。 例如: MyTestFunc = function(x) { myVal = "abcde" # what is
我想要一个带有数据名(dat)、因子(myfactor)、变量名(myvar)等参数的函数来动态生成直方图(必须使用lattice)。 使用 IRIS 作为最小示例: data(iris) my_hi
我正在编写一个 R 包,其中有这样一个 Rmd 模板: child.Rmd: ```{r} print(x) ``` 还有这样一个函数: child = v1.6.3): knit_child() 获
编辑以提供完整的代码示例和特定问题 我正在编写一个函数来生成股票价格的时间序列图。但是,出现以下错误 eval(expr,envir,enclos)中的错误:找不到对象'df1234' 这是该函数的示
我发现 knitr 文档从用户环境继承变量,即使参数 envir = new.env()提供。如何防止它继承这些变量? 例如,假设我使用一个不存在的变量 ( y ) 编写了一个简单的 .Rmd 文件,
我不明白这里出了什么问题。 data.train <- read.table("Assign2.WineComplete.csv",sep=",",header=T) # Building decis
我是 R 及其包系统的新手,刚刚编写了我的第一个包,目的是将它与 OpenCPU 一起使用。 执行这个函数时: #' Create a PNG which shows interpolated sen
我不明白这里出了什么问题。 data.train 。您需要更改公式或数据框,使它们彼此一致。 澄清一下:Pre 是一个包含公式的对象。该公式包含对变量 pre 的引用。后者必须与数据框一致。 关于r
我正在解决 Kaggle 数字识别器问题。当我尝试给定的代码时,出现错误。 eval(expr,envir,enclos)中的错误:找不到函数“eval” library(ggplot2) libra
当我尝试“编织 HTML”或使用 LyX 生成 pdf 时,我遇到了环境问题。当我直接运行 R 代码(或用 Rstudio 编译 HTML 笔记本)时,没问题。我已经用 knitr@1.3.7(开发版
我尝试将geom_ribbon对象添加到我的ggplot2图中。在我的数据框中,我有NA值(我想)可能会引起问题。这是我拥有的数据帧的可复制示例: base <- c(1:10, rep(NA, 10
我基于 kind help 在 R 中创建了一个函数来自@Jim M。 当我运行该函数时,出现错误:错误:未知列“原始数据” 查看调试器时,我收到消息: Rcpp::eval(expr, envir,
我在使用一个简单的 ggplot 命令时遇到了一个意外错误,我已经用尽了所有的网络搜索来找到类似的问题。 qplot(hp,mpg,data=mtcars) Error in list2env(mem
我不确定这是否应该发布到 R-devel (如果是这样,请告诉我...)但 R 的 eval() 的文档中似乎至少有一个错误。函数,这对于 R 的非标准评估特性是必不可少的,或者我做错了什么? > e
我不明白为什么我的极简封装函数会产生主题错误。下面应该重现它。我的目标是根据单个数据框中的数据绘制一堆图,每个图都位于一个新窗口中。 library(ggplot2) library(datasets
我是一名优秀的程序员,十分优秀!