[R] sort order of a character sequence is different on windose and linux (linux result)

Witold E Wolski wewolski at gmail.com
Sun Jul 6 13:56:23 CEST 2014

This is the info I got from the data.table developers... Seems that
they did have tried to find a more elegant solution solution.:

data.table used to support this until 1.8.6. But since Scollate became
not a part of authorised R-API (IIUC) anymore at some point,
data.table only supports sort/order under the C-locale.

data.table's ordering/sorting is over 10-20x faster than base's and
the only way right now (IIUC) to sort by locale is to use base's

This post may give some more insight.

In summary, we support only C-locale.

On 6 July 2014 13:33, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 06/07/2014, 7:19 AM, Witold E Wolski wrote:
>> It seems that the package I am developing depends on the locale "C"
>> because of interactions with other packages (data.table).
>> So I would like to set the locale to "C" as soon as the package is loaded.
>> Where can I do it .. I could of course set it in every function in my
>> package but...
> As the help page says, you can't do it reliably on all platforms, and
> you really shouldn't even try:  that will affect other things that the
> user does.
> You will need to find another solution to your problem.
> Duncan Murdoch

Witold Eryk Wolski

More information about the R-help mailing list