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
arrange_if, arrange_at, arrange_all? #2682
Comments
I assume this just slipped our minds. @lionel- can you please add? |
would this UI be reasonable? arrange_all(mtcars, .desc = vars(mpg, cyl))
arrange_at(mtcars, vars(drat, hp), .desc = vars(mpg, cyl))
arrange_if(iris, is_factor, .desc = is_double) hmm maybe this one is better: arrange_at(mtcars, desc(drat, hp), vars(mpg, cyl))
arrange_if(iris, is_factor, .desc = TRUE)
arrange_all(mtcars, .desc = TRUE)
|
Or: arrange_if(iris, desc(is_factor))
arrange_if(iris, funs(desc(is_factor), is_numeric))
arrange_all(desc(mtcars)) I like them separately but not sure if they are consistent taken together. Also the |
I think I like the first option the best, but it's not great. Lets implement without |
IMHO, this is enough, at least for now. As we cannot easily control the order of variable via scoped variants, the support for the verbs like |
Thanks! |
(This issue is just out of curiosity. I don't find these useful yet)
Together with
filter()
,mutate()
,select()
, andsummarise()
,arrange()
is referred to asin the vignette, "Introduction to dplyr"
While all of other basic verbs (plus
group_by()
) got their colwise forms, why are there no scopedarrange()
? Are there any good reason to avoid implementingarrange()
variants? Or, is it just because no one has requested the feature so far?arrange()
has a bit different semantics in that the order of arguments affects the result and it is difficult to deduce which columns are used in what order from the result. So, I feel the idea of colwise may not be suitable for this verb. But, I still wonder it should exist or not just for consistency.The text was updated successfully, but these errors were encountered: