namespace:vctrs Error message when using group_by with dplyr

550 Views Asked by At

I'm trying to use dplyr to simply group by one variable and summarize based on others. I've done this kind of thing many times in the past, but now get an error message that seems to be related to the vctrs namespace.

library(dplyr)
dat <- data.frame(COHORT=c('FF20','FF20','FF20','FF19','FF19'), 
                         x=c(30, 35, 40, 45, 55))
dat %>% summarize(n())

Gives the expected result of

1   5

But if I try to group by COHORT and count, I get an error:

dat %>% group_by(COHORT) %>% summarize(n())

Error: 'data_frame' is not an exported object from 'namespace:vctrs'
In addition: Warning message:
`...` is not empty.

We detected these problematic arguments:
* `needs_dots`

These dots only exist to allow future extensions and should be empty.
Did you misspecify an argument? 

What does the error mean, and how do I fix things? I'm running RStudio 1.4.1106 on WIN 10. After starting to receive these messages, I updated my installation and am now running R version 3.5.3 with dplyr 0.0.5 vctrs 0.2.4

This is the session info:

> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.3   assertthat_0.2.1 cli_2.3.1        tools_3.5.3      glue_1.4.0    

Typing is a skill... I'm running dplyr 0.8.5. That's the latest binary version.

0

There are 0 best solutions below