dplyr select error

Calling the select function in dplyr generates an error. I've tried the dplyr::select trick to no avail. I've ruled out issues with my dataframe as the syntax below calling mtcars even generates the error. I've tried reinstalling tidyverse, dplyr, tidyselect. All to no avail.

mtcars %>% select(mpg)

Here's the error message:

Error in select():
! ... must be empty.
x Problematic argument:
• call = call
Backtrace:

  1. mtcars %>% select(mpg)
  2. dplyr:::select.data.frame(., mpg)
  3. tidyselect::eval_select(expr(c(...)), .data)
  4. tidyselect:::eval_select_impl(...)
  5. tidyselect:::vars_select_eval(...)
    ...
  6. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
  7. tidyselect:::walk_data_tree(init, data_mask, context_mask)
  8. tidyselect:::as_indices_sel_impl(...)
  9. tidyselect:::as_indices_impl(...)
  10. vctrs::vec_as_subscript(x, logical = "error", call = call, arg = arg)

Hi @ecamburn, I'm run the code and obtain the good output.
Maybe you have a old version of dplyr

Try to update the dplyr.

# > mtcars %>% select(mpg)
# mpg
# Mazda RX4           21.0
# Mazda RX4 Wag       21.0
# Datsun 710          22.8
# Hornet 4 Drive      21.4
# Hornet Sportabout   18.7
# Valiant             18.1

Try to install from git:

devtools::install_github("tidyverse/dplyr")

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.