with_collate | R Documentation |
Temporarily change collation order by changing the value of the
LC_COLLATE
locale.
with_collate(new, code)
local_collate(new = list(), .local_envir = parent.frame())
new |
|
code |
|
.local_envir |
|
[any]
The results of the evaluation of the code
argument.
# Modify collation order: x <- c("bernard", "bérénice", "béatrice", "boris") with_collate("fr_FR", sort(x)) #> [1] "béatrice" "bérénice" "bernard" "boris" with_collate("C", sort(x)) #> [1] "bernard" "boris" "béatrice" "bérénice"
withr
for examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.