5

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  
Tung
  • 26,371
  • 7
  • 91
  • 115
  • 1
    Works fine for me on `R 3.4.4`, `ggplot2 2.2.1.9000 (March 31)` – Tung Apr 02 '18 at 16:41
  • When you're using the dev version, odd compatibility things can happen, since it's essentially unfinished. It's most likely either an R version or package version mismatch. – joran Apr 02 '18 at 16:45
  • Did you solve this? I got the same error on some work and replicating your example with new session the same as you. I am also using 3.4.4. and 2.2.1.9000 as per @Tung. I'm on Windows – pssguy Apr 24 '18 at 14:40
  • 4
    @pssguy: I've just tried this again and still worked with `R 3.5.0` & `ggplot 2.2.1.9000 (2018-04-24)`. You probably should try reinstall `ggplot` & all dependencies again: `update.packages(checkBuilt = TRUE, ask = FALSE)` then `install.packages("ggplot2", dependencies = TRUE)`. – Tung Apr 24 '18 at 16:26

0 Answers0