问题
Loaded this up in a new R session. I can't figure out what's wrong.
library(ggplot2)
ggplot(mtcars, aes(mpg, wt)) + geom_point() + facet_wrap( ~ cyl)
Error:
Error: `predicate` must be a closure or function pointer
ls()
character(0)
Session Info:
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
来源:https://stackoverflow.com/questions/49615091/ggplot2-facet-wrap-error-predicate-must-be-a-closure