-
Notifications
You must be signed in to change notification settings - Fork 986
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
forder sorts capital letters differently from base::order #1103
Comments
Note, this doesn't happen in a session with LC_COLLATE=C but it does with LC_COLLATE=en_US.UTF-8 and LC_COLLATE=English_United States.1252 |
@ahardjasa, we're aware of this. Duplicate of #565. As written under
The function |
Ah, sorry, I didn't notice that. Thanks and apologies. |
no worries 👍 |
When fast data table ordering is used (e.g. in dt[order(x)] or setorder(dt, x)), uppercase letters are sorted ahead of lowercase letters (A B a b), while base::order sorts with interspersed cases (a A b B). This leads to undesired behaviour e.g. a data table and data frame with identical contents will not be equivalent even if the same command: data[order(data$id), ] is performed.
Example is below, I tried with both 1.9.4 and 1.9.5.
The text was updated successfully, but these errors were encountered: