You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding dplyr::select.list() to override utils::select.list() #4279
As utils::select.list() is registered as an S3, calling dplyr::select() on a list calls select.list() without informing the user, who is faced with an interactive prompt asking them to do a selection. As far as I have understood this behavior is not intended.
I think this misuse can arise if you intend to write map_df() %>% select() and you end up writing map() %>% select().
Here's a suggested solution:
having a message to the user that they are redirected to utils::select.list()
#' @exportselect.list<-function(.data, ...) {
message("Calling `select()` on a list, redirecting to `utils::select.list()`")
utils::select.list(choices=.data)
}
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
Activity
romainfrancois commentedon Mar 13, 2019
🤔 I'd rather have it abort.
select.list()is not a method in the first place, signatures don't match, ...if the user wants to call
select.list()they they should callselect.list()notselect().ColinFay commentedon Mar 13, 2019
That was also my first idea, but
makes
select.list()fail 😕(But maybe there's a workaround?)
+ select.list()
+ select.list()
lock commentedon Mar 21, 2020
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/