问题
data <- tibble(x = 1:5, y = 6:10)
data %>% select(x)
returns
Error: `...` is not empty.
We detected these problematic arguments:
* `logical`
These dots only exist to allow future extensions and should be empty.
Did you misspecify an argument?
I can not figure out what is causing this error. I've tried reinstalling dplyr, restarting R, restarting the computer. Any suggestions would be appreciated. Running slang::last_error() gives
<error/rlib_error_dots_nonempty>
`...` is not empty.
We detected these problematic arguments:
* `logical`
These dots only exist to allow future extensions and should be empty.
Did you misspecify an argument?
Backtrace:
9. dplyr::select(., x)
11. tidyselect::vars_select(tbl_vars(.data), !!!enquos(...))
12. tidyselect:::eval_select_impl(...)
20. tidyselect:::vars_select_eval(...)
21. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
22. tidyselect:::eval_c(expr, data_mask, context_mask)
23. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
24. tidyselect:::walk_data_tree(init, data_mask, context_mask)
25. tidyselect:::as_indices_sel_impl(...)
26. tidyselect:::as_indices_impl(x, vars, strict = strict)
27. vctrs::vec_as_subscript(x, logical = "error")
28. ellipsis::check_dots_empty()
29. ellipsis:::action_dots(...)
Run `rlang::last_trace()` to see the full context.
回答1:
I had a similar problem right after I installed a new package that resulted in many other packages being updated. I think one of them got corrupted. Installing the dev version of dplyr had no effect, nor did reinstalling the normal dplyr.
What ended up working for me was to reinstall all of the packages mentioned in the rlang::last_error()
backtrace.
回答2:
We can install the devel
version of dplyr
and it could solve the issue
devtools::install_github("tidyverse/dplyr")
回答3:
I had the same thing occur. Pretty much out of the blue. Happened with tidyr::separate, So it probably propagates from dplyr into other packages depending on it. Happened on code that had no issue running previously.
Also managed to solve it by installing the dev version of dplyr, but I find this a very tricky solution. :/
来源:https://stackoverflow.com/questions/60021210/dplyr-select-is-claiming-that-i-have-extra-arguments-that-are-not-there