我试图geom_subplot从ggsubplot包中的帮助页面运行示例.
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()
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Error in layout_base(data, vars, drop = drop) :
At least one layer must contain all variables used for facetting
Run Code Online (Sandbox Code Playgroud)
对于我到目前为止尝试运行的每个ggsubplot示例都会出现同样的错误.我已尝试使用gansubplot的CRAN和github版本.我敢打赌,这与最新版本的ggplot2不兼容,但我不太了解ggplot开发来自己诊断它.
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
Run Code Online (Sandbox Code Playgroud)
似乎ggsubplot不再维护该包。
\n\n软件包 \xe2\x80\x98ggsubplot\xe2\x80\x99 已从 CRAN 存储库中删除。
\n以前可用的版本可以从存档中获取。
\n应维护者 garrett@rstudio.com 的要求,存档于 2016-01-11。
\n
在 GitHub ( https://github.com/garrettgman/ggsubplot ) 上,最后一次提交可以追溯到 2015 年 7 月 9 日。
\n在 R 3.3.2 下从 GitHub 安装devtools::install_github(\'garrettgman/ggsubplot\')失败,并显示一条错误消息,抱怨缺少功能eval。
| 归档时间: |
|
| 查看次数: |
1137 次 |
| 最近记录: |