I'm trying to run a simple command from the dplyr package and I can't for the life of me make it work. This is what I get when executing one of the examples in dplyr::count()'s documentation:
dplyr::count(mtcars, cyl)
#> Error in quo_is_missing(wt) || quo_is_null(wt) :
#> invalid 'y' type in 'x || y'
This is my session info:
sessionInfo()
#> R version 3.4.2 (2017-09-28)
#> Platform: x86_64-apple-darwin15.6.0 (64-bit)
#> Running under: macOS Sierra 10.12.5
#> Matrix products: default
#> BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#> loaded via a namespace (and not attached):
#> [1] compiler_3.4.2 tools_3.4.2 yaml_2.1.15
And these are the session info and conflicts after loading dplyr:
sessionInfo()
#> R version 3.4.2 (2017-09-28)
#> Platform: x86_64-apple-darwin15.6.0 (64-bit)
#> Running under: macOS Sierra 10.12.5
#> Matrix products: default
#> BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#> other attached packages:
#> [1] dplyr_0.7.4.9000
#> loaded via a namespace (and not attached):
#> [1] tidyselect_0.2.3 compiler_3.4.2 magrittr_1.5 assertthat_0.2.0 R6_2.2.2
#> [6] tools_3.4.2 bindrcpp_0.2 glue_1.2.0.9000 tibble_1.3.4 yaml_2.1.15
#> [11] Rcpp_0.12.14 knitr_1.17 pkgconfig_2.0.1 rlang_0.1.4.9000 purrr_0.2.4.9000
#> [16] bindr_0.1
conflicts(detail=TRUE)
#> $`package:dplyr`
#> [1] "filter" "lag" "intersect" "setdiff" "setequal" "union"
#> $`package:stats`
#> [1] "filter" "lag"
#> $`package:methods`
#> [1] "body<-" "kronecker"
#> $`package:base`
#> [1] "body<-" "intersect" "kronecker" "setdiff" "setequal" "union"
I had the development version (purrr_0.2.4.9000) of purrr installed. I'm not sure how this would affect the dplyr::count() function, but installing the CRAN version of purrr solved the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With