7
我有以下的R-脚本:错误与grid.arrange:输入必须是grobs
library(ggplot2)
library(gridExtra)
Sys.setenv(LANG ="en")
c1 <- ggplot(mtcars, aes(factor(cyl))) + geom_bar()
c2 <- ggplot(mtcars, aes(factor(cyl))) + geom_bar() + coord_flip()
grid.arrange(c1, c2, ncols=1)
我碰到下面的错误与grid.arrange:
错误arrangeGrob(.. ,as.table = as.table,夹夹=,主要= 主,:输入必须grobs
我想不出是什么原因导致的问题
!这里是我使用的版本:
sessionInfo() [R版本3.0.2(2013年9月25日) 平台:x86_64的 - 苹果darwin10.8.0(64位)
locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] gridExtra_0.9.1 ggplot2_0.9.3.1
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 digest_0.6.4 gtable_0.1.2 labeling_0.2 MASS_7.3-31 munsell_0.4.2 plyr_1.8.1 proto_0.3-10 Rcpp_0.11.1 reshape2_1.2.2
[11] scales_0.2.4 stringr_0.6.2 tools_3.0.2
非常感谢。在我看来,对我来说太早了。除了这个,我已经仔细检查了一切......谢谢! – JerryWho
@JerryWho不客气! – tonytonov