[R] Sorting of character vectors
Pascal A. Niklaus
Pascal.Niklaus at ieu.uzh.ch
Tue Nov 8 15:52:02 CET 2016
Thanks for all suggestions.
With my build (from the CRAN repo) I don't get ICU support, and setting
LC_COLLATE to "C" did not help.
> capabilities("ICU")
ICU
FALSE
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
locale:
[1] LC_CTYPE=en_DK.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_DK.UTF-8 LC_COLLATE=C
[5] LC_MONETARY=en_DK.UTF-8 LC_MESSAGES=en_DK.UTF-8
[7] LC_PAPER=en_DK.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_DK.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.3.2 tools_3.3.2
However, using stringi::stri_sort did the trick !
More information about the R-help
mailing list