After reporting completion in Notepad ++, you can change the local settings:
Sys.setlocale(, "C")
sort(tv)
# [1] "A" "B" "a" "ab"
EDIT. I am reading the help pages Sys.setlocaleand it seems that changing is LC_COLLATEenough:Sys.setlocale("LC_COLLATE", "C")
You can flip it into a function if you use it more than once:
sortC <- function(...) {
a <- Sys.getlocale("LC_COLLATE")
on.exit(Sys.setlocale("LC_COLLATE", a))
Sys.setlocale("LC_COLLATE", "C")
sort(...)
}
Marek source
share