ggplot2 facet_wrap错误:谓词必须是一个闭包

时间:2018-04-02 16:37:48

标签: r ggplot2 facet-wrap

在新的R会话中加载了这个。我无法弄清楚出了什么问题。

library(ggplot2)

ggplot(mtcars, aes(mpg, wt)) + geom_point() + facet_wrap( ~ cyl)

错误:

Error: `predicate` must be a closure or function pointer

ls()
character(0)

会话信息:

R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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] ggplot2_2.2.1.9000

loaded via a namespace (and not attached):
 [1] colorspace_1.3-2  scales_0.5.0.9000 compiler_3.4.2    lazyeval_0.2.0    plyr_1.8.4        tools_3.4.2       withr_2.1.2      
 [8] pillar_1.2.1      gtable_0.2.0      tibble_1.4.2      yaml_2.1.16       Rcpp_0.12.16      grid_3.4.2        rlang_0.2.0.9001 
[15] munsell_0.4.3  

0 个答案:

没有答案