Skip to content

Instantly share code, notes, and snippets.

@hadley
Created December 5, 2014 22:04
Show Gist options
  • Select an option

  • Save hadley/3fc094bc9216d72bece3 to your computer and use it in GitHub Desktop.

Select an option

Save hadley/3fc094bc9216d72bece3 to your computer and use it in GitHub Desktop.
library(stringi)
locales <- stri_locale_list()
main <- locales[!stri_detect_fixed(locales, "_")]
main_col <- lapply(main, stri_opts_collator)
sorted <- lapply(main_col, function(x) stri_sort(letters, opts_collator = x))
names(sorted) <- main
noquote(simplify2array(Filter(function(x) !identical(x, letters), sorted)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment