Skip to content
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

scoped variants of arrange() respect the .by_group argument #3504

Merged
merged 2 commits into from
May 5, 2018

Conversation

romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Apr 12, 2018

Closes #3245.

@@ -5,6 +5,7 @@
#' variables before ordering with [funs()].
#'
#' @inheritParams scoped
#' @param .by_group see [arrange()]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would @inheritParams work here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂️

if (inherits(.tbl, "grouped_df")){
arrange(.tbl, !!!funs, .by_group = .by_group)
} else {
arrange(.tbl, !!!funs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we supply a .by_group argument to arrange.tbl_df() instead, and ignore it there? The patch would be smaller.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just ignore it in arrange.tbl_df ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krlmlr krlmlr merged commit 649035f into master May 5, 2018
@krlmlr
Copy link
Member

krlmlr commented May 5, 2018

Thanks! I'll tweak it a bit.

@romainfrancois romainfrancois deleted the arrange_all_by_group branch May 8, 2018 07:28
@lock
Copy link

lock bot commented Nov 4, 2018

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/

@lock lock bot locked and limited conversation to collaborators Nov 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants