We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
slice_first_by_key()
pryr::join has a match = "all" arg that can also be "first".
match = "all"
"first"
it should be similar to %>% group_by(keys) %>% slice(1)
%>% group_by(keys) %>% slice(1)
it could also be a pre-processor so we can apply it on any side.
slice_first_by_key() ?
pryr's doc mentions it's faster so there might be some optimisation to do but let's not focus on performance unless there's explicit demand
The text was updated successfully, but these errors were encountered:
https://stackoverflow.com/questions/70661273/how-do-i-add-an-x-and-y-suffix-to-all-duplicate-variables-after-the-join
Sorry, something went wrong.
This is %>% summarise_by_keys(across()[1,]) equivalent to %>% summarise_by_keys(slice(across(), 1))
%>% summarise_by_keys(across()[1,])
%>% summarise_by_keys(slice(across(), 1))
We also find the use case %>% summarise_by_keys(across()[which.max(some_col),]), equivalent to %>% summarise_by_keys(slice_max(across()))
%>% summarise_by_keys(across()[which.max(some_col),])
%>% summarise_by_keys(slice_max(across()))
And I am not sure we need slice_max_by_key(), slice_min_by_key(), slice_median_by_key()...
slice_max_by_key()
slice_min_by_key()
slice_median_by_key()
Maybe just add some examples using across() to introduce the idiom.
across()
Use R-CMD-check-base to avoid flood of PRs
476e6fa
#15
No branches or pull requests
pryr::join has a
match = "all"
arg that can also be"first"
.it should be similar to
%>% group_by(keys) %>% slice(1)
it could also be a pre-processor so we can apply it on any side.
slice_first_by_key()
?pryr's doc mentions it's faster so there might be some optimisation to do but let's not focus on performance unless there's explicit demand
The text was updated successfully, but these errors were encountered: