-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to support extensions of dplyr
verbs in galah
#161
Comments
Test with `filter` as synonym for `galah_filter`. In theory this should work already; but in practice I get: ``` galah_call() |> filter(year > 2020) |> atlas_counts() Error in UseMethod("filter") : no applicable method for 'filter' applied to an object of class "data_request" ```
This code should work; but again the problem here is how to get R to recognise that an S3 method exists, which is partly about NAMESPACE and partly about `roxygen2`. Sometimes this works, other times it fails. Super annoying
As a side-effect, `limit` is now `NULL` by default
Note to self to support On a related note; technically we've implemented |
Since adding `importFrom dplyr function` to each file, this wasn't actually doing anything other than generating an error. However, `exportS3Method` is still recommended in some documentation, so it's unclear why this approach is better
not from `dplyr`, but works in the same way
Added new `parse_select` function to do most of the work
Given that we only use on function from `data.table`, the only thing stopping us from replacing it was the number of dependencies associated with `dplyr`. This is no longer an issue as we import `dplyr` to access other functions, such as `filter`, `select` and `group_by` (#161)
Also update documentation to refer to `dplyr` verbs when `?galah` is called
Mainly referring back to their synonymous functions.
complete |
At a recent webinar, @huizezhang-sherry suggested that we could implement extensions
dplyr
functions pretty easily, given that our functions use the same methods and terminology anyway. E.g. instead of:We could then use:
The approach is documented here.
Some other thoughts:
select/galah_select
,group_by/galah_group_by
obvious extensionsdplyr
equivalent but could have alternate names, e.g.identify/galah_identify
(also an S3 function fromgraphics
) orapply_profile/galah_apply_profile
atlas_counts(expand = TRUE)
could be replaced byexpand() |> atlas_counts()
(currently an S3 method intidyr
)The text was updated successfully, but these errors were encountered: