Controls the way collation is done by ICU (an optional part of the R build).
icuSetCollate(...)<p></p><p>icuGetCollate(type = c("actual", "valid"))</p>
| Parameter | Description |
|---|---|
… |
Named arguments, see ‘Details’. |
type |
character string: can be abbreviated. Either the actual locale in use for collation or the most specific locale which would be valid. |
# NOT RUN {
## These examples depend on having ICU available, and on the locale.
## As we don't know the current settings, we can only reset to the default.
if(capabilities("ICU")) {
print(icuGetCollate())
print(icuGetCollate("valid"))
x <- c("Aarhus", "aarhus", "safe", "test", "Zoo")
print(sort(x))
icuSetCollate(case_first = "upper"); print(sort(x))
icuSetCollate(case_first = "lower"); print(sort(x))
## Danish collates upper-case-first and with 'aa' as a single letter
icuSetCollate(locale = "da_DK", case_first = "default"); print(sort(x))
## Estonian collates Z between S and T
icuSetCollate(locale = "et_EE"); print(sort(x))
icuSetCollate(locale = "default"); print(icuGetCollate("valid"))
}
# }