dplyr::select() no longer works

I have been using R and tidyverse for several years on my office computer. Suddenly, tidyr::select() is no longer working:


Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

Warning message:
package ‘dplyr’ was built under R version 3.6.2 
> mtcars %>% select(mpg)
Error: 'vec_as_subscript' is not an exported object from 'namespace:vctrs'
Run `rlang::last_error()` to see where the error occurred.

Does anyone have any suggestions for how to fix this?

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

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

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

other attached packages:
[1] dplyr_0.8.4

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3       zeallot_0.1.0    crayon_1.3.4     assertthat_0.2.1
 [5] R6_2.4.1         backports_1.1.5  magrittr_1.5     pillar_1.4.2    
 [9] rlang_0.4.4      rstudioapi_0.10  vctrs_0.2.0      tools_3.6.1     
[13] glue_1.3.1       purrr_0.3.3      yaml_2.2.0       compiler_3.6.1  
[17] pkgconfig_2.0.3  tidyselect_1.0.0 tibble_2.1.3    

vec_as_subscript() is a new function that was introduced in vctrs 0.2.2. It seems that you have 0.2.0 installed.

Could you try updating vctrs to the latest version?

Beautiful. Updated vctrs and it works perfectly. I should have known how to intepret that message better. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.