Search code examples
rselectdplyrtibblerlang

dplyr select outputs error "Error: Can't assign an integer vector to a list of quosures"


I guess I updated one of the libraries and now dplyr's select dose't work. any ideas which library do reinstall and which version to avoid conflicts?

x <- data.frame(a=c(1,2,3),b=c(1,2,3))
dplyr::select(x,a)

Error: Can't assign an integer vector to a list of quosures

Backtrace:

-dplyr::select(x, a)
 -select.data.frame(x, a)
 -select_vars(names(.data), !(!(!quos(...))))
 -map_if(ind_list, !is_helper, eval_tidy, data = names_list)
 -`[<-.quosures`(`*tmp*`, matches, value = structure(list(1L), .Names = ""))
 -abort_quosure_assign(value[[idx]])`

sessionInfo()

R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Hebrew_Israel.1255  LC_CTYPE=Hebrew_Israel.1255    LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C                   LC_TIME=Hebrew_Israel.1255    

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

other attached packages:
[1] RevoUtilsMath_10.0.0 RevoUtils_10.0.5     RevoMods_11.0.0      MicrosoftML_1.5.0    mrsdeploy_1.1.2      RevoScaleR_9.2.1     lattice_0.20-35      rpart_4.1-11        

loaded via a namespace (and not attached):
 [1] codetools_0.2-15       CompatibilityAPI_1.1.0 foreach_1.4.3          grid_3.4.1             R6_2.2.2               jsonlite_1.5           curl_3.0               iterators_1.0.8        tools_3.4.1           
[10] yaml_2.1.14            compiler_3.4.1         mrupdate_1.0.1     

Update::

when I run

vars <- select_vars(names(.data), !(!(!quos(...))))

in debug mode (Function: select.data.frame (namespace:dplyr)), i get the following message

Error in !quos(...) : invalid argument type

but

substitute(...)
>a

Solution: There was a conflict with the new tibble library and rlang. downloading both from CRAN solved the issue


Solution

  • one of the libraries I downloaded from github has downloaded a newer version of rlang and dplyr. this has caused a conflict issue.

    I reinstalled older versions of rlang and dplyr, this has solved the issue!