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

[R-Forge #5613] order and base::order give different results #478

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 2 comments
Closed
Assignees
Milestone

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Christian Wolf; Assigned to: Nobody; R-Forge link

This is with revision 1263.

library(data.table)
my.dt <- data.table(a=c("$","€","+",0,1,"a","A"))
my.dt[base::order(a)]
#    a
#1: $
#2: €
#3: +
#4: 0
#5: 1
#6: a
#7: A

my.dt[order(a)]
#    a
#1: $
#2: +
#3: 0
#4: 1
#5: A
#6: a
#7: €
@arunsrinivasan arunsrinivasan added this to the v1.9.4 milestone Jun 19, 2014
@arunsrinivasan
Copy link
Member Author

From v1.9.3+, DT[order(.)] is optimised to use internal fast order, which by default, always sorts in C-locale. This is therefore not a bug, rather should be documented (maybe as a FAQ as well). Changed from bug to documentation. Tagging Rdatatable/www#1

@arunsrinivasan
Copy link
Member Author

Also related to #704

arunsrinivasan added a commit that referenced this issue Jun 23, 2014
@arunsrinivasan arunsrinivasan self-assigned this Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant