无法运行任何ggsubplot示例 [英] Cannot run any ggsubplot examples
问题描述
我试图从 ggsubplot
包中的 geom_subplot
帮助页面运行示例。
pre $ library $ g
b
$ b ggplot(nasa)+
geom_subplot(aes(long,lat,group = id,
subplot = geom_point(aes(surftemp,temperature),size = 1/4)) )+
coord_map()
我得到以下错误:
layout_base(data,vars,drop = drop)中的错误:
至少有一个图层必须包含用于构建切面的所有变量
到目前为止我尝试运行的每个ggsubplot示例都会出现同样的错误。我已经尝试了CRAN和github版本的ggsubplot。我敢打赌,这是与ggplot2的最新版本不兼容,但我不知道ggplot开发自己诊断它。
R.version
_
平台x86_64-w64-mingw32
arch x86_64
os mingw32
系统x86_64,mingw32
状态
主要3
小1.0
2014年
月04
日10
svn rev 65387
语言R
version.string R版本3.1.0(2014-04-10)
绰号Spring Dance
> sessionInfo()
R版本3.1.0(2014-04-10)
平台:x86_64-w64-mingw32 / x64(64位)
语言环境:
[1] LC_COLLATE =英语_美国.1252 LC_CTYPE =英语_美国.1252 LC_MONETARY =英语_美国.1252
[4] LC_NUMERIC = C LC_TIME = English_United States.1252
附加的基本套餐:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggsubplot_0.3.1 ggplot2_0.9.3.1 devtools_1.5
通过命名空间加载(并且未附加):
[1] colorspace_1.2-4 digest_0.6.4 evaluate_0.5.5 grid_3.1.0 gtable_0.1.2 httr_0.3 labeling_0.2 MASS_7.3-32
[9] memoise_0.2.1 munsell_0.4.2 parallel_3.1.0 plyr_1.8.1 proto_0.3-10 Rcpp_0.11.1 RCurl_1.95-4.1 reshape2_1.4
[17] scales_0.2.4 stringr_0.6.2 tools_3.1.0 whisker_0。 3-2
解决方案 CRAN留言(截至2016-12-23) :
软件包'ggsubplot'已从CRAN存储库中删除。
可以从档案中获得可用的版本。
根据维护者garrett@rstudio.com的要求,在2016-01-11存档。
在GitHub上( https://github.com/garrettgman/ggsubplot ),最后一次提交的时间可以追溯到2015-07-09。
在R 3.3下从GitHub安装.2 with devtools :: install_github('garrettgman / ggsubplot')
失败,抱怨缺少函数 eval
。
I am trying to run the example from the geom_subplot
help page from the ggsubplot
package.
library(ggplot2)
devtools::install_github('ggsubplot', 'garrettgman')
library(ggsubplot)
ggplot(nasa) +
geom_subplot(aes(long, lat, group = id,
subplot = geom_point(aes(surftemp, temperature), size = 1/4))) +
coord_map()
And I get the following error:
Error in layout_base(data, vars, drop = drop) :
At least one layer must contain all variables used for facetting
This same error occurs with with every ggsubplot example I've tried to run so far. I've tried with both the CRAN and github version of ggsubplot. I would bet this is an incompatibility with the newest version of ggplot2 but I don't know enough about ggplot development to diagnose it myself.
R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 1.0
year 2014
month 04
day 10
svn rev 65387
language R
version.string R version 3.1.0 (2014-04-10)
nickname Spring Dance
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggsubplot_0.3.1 ggplot2_0.9.3.1 devtools_1.5
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 digest_0.6.4 evaluate_0.5.5 grid_3.1.0 gtable_0.1.2 httr_0.3 labeling_0.2 MASS_7.3-32
[9] memoise_0.2.1 munsell_0.4.2 parallel_3.1.0 plyr_1.8.1 proto_0.3-10 Rcpp_0.11.1 RCurl_1.95-4.1 reshape2_1.4
[17] scales_0.2.4 stringr_0.6.2 tools_3.1.0 whisker_0.3-2
It seems that package ggsubplot
no longer is maintained.
Message on CRAN (as of 2016-12-23):
Package ‘ggsubplot’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2016-01-11 as requested by the maintainer garrett@rstudio.com.
On GitHub (https://github.com/garrettgman/ggsubplot), the last commit dates back to 2015-07-09.
Installation from GitHub under R 3.3.2 with devtools::install_github('garrettgman/ggsubplot')
failed with an error message complaining about missing function eval
.
这篇关于无法运行任何ggsubplot示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!