Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

remove lazyeval implementations for dplyr verbs #487

Closed
romainfrancois opened this issue Nov 17, 2020 · 2 comments
Closed

remove lazyeval implementations for dplyr verbs #487

romainfrancois opened this issue Nov 17, 2020 · 2 comments

Comments

@romainfrancois
Copy link
Contributor

We're trying to remove the *_() verbs from dplyr :

tidyverse/dplyr#5573
tidyverse/dplyr#5592

Initially we'd just like to remove the fallbacks that call the underscore function, and then later we'll remove the underscore function altogether.

For example, we'd like to remove this:

group_by.default <- function(.data, ..., add = FALSE, .drop = group_by_drop_default(.data)) {		
   group_by_(.data, .dots = compat_as_lazy_dots(...), add = add)		
 }

but ggvis uses them, e.g.: https://github.com/rstudio/ggvis/blob/master/R/dplyr.R

group_by_.ggvis <- function(.data, ..., .dots, add = FALSE) {
  dots <- lazyeval::all_dots(.dots, ...)
  pieces <- extract_lazy_inputs(dots)

  register_computation(.data, pieces$inputs, "group_by", function(data, args) {
    dplyr::group_by_(data, .dots = lapply(pieces$lazy, add_args, args),
      add = add)
  })
}

Perhaps ggvis could instead define methods for the non underscore verbs instead ?

@wch
Copy link
Contributor

wch commented Nov 17, 2020

I don't have time to implement that, but I'd be happy to look at a PR. We'll probably have to keep the underscore functions in ggvis for a while before we can remove them.

@hadley
Copy link
Member

hadley commented Nov 17, 2020

I've spend a few minutes exploring this, I think we can get rid of the underscore functions relatively easily

@wch wch closed this as completed in 99c956d Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants