-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add a .method
argument to the data frame method of arrange()
#5090
Conversation
f3ae71c
to
63cc89a
Compare
Problems:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but that can equally wait for 1.1.0 ?
Is the first problem enough justification to start depending on R > 3.3 ? |
My current impression is that we will wait on this and maybe eventually add a custom ordering function to vctrs that works on R 3.2 and uses radix sorting, along with the ability to specify ascending/descending per column, but I might be wrong. It seems like that will be a tough project though |
Superseded by #6263 |
Closes #4962
This PR adds a
.method
argument to the data frame method ofarrange()
. It defaults to"dplyr_auto"
, but can also be any validorder()
method."dplyr_auto"
is more aggressive than"auto"
in two ways:In addition to integer, numeric and logical vectors, it also uses radix ordering for character vectors. This forces the use of a C-locale, but is very fast. This is a breaking change for the defaults of
arrange()
.It uses
typeof()
rather thanis.*()
functions when determining if radix ordering can be used to operate at a level lower than S3 dispatch. This probably doesn't matter too much, because it is called on the comparison proxies of the columns (which generally returns the underlying raw data), but it still felt more correct.