Best practice: Should I try to change to UTF-8 as locale or is it safe to leave it as is?
This is not a perfect answer but a good workaround: As Roland pointed out, it might be dangerous to change the locale. So leave it as is. If you have a file and you run into trouble, just search for non-UTF8 encoding as discribed here for RStudio
. What I saw, most Editors have such a feature.
Furthermore, this answer gives more insight in what you can do in case you source()
a file.
For a way to deal with locales when collations play a crucial part see here
Why did R's sorting change data imported with load() after an upgrade from 3.5.2 to 4.0.0?
In summary, it was a bug which has been removed in R version 4.0.1. As @Roland figured out.
From CRAN:
In R 4.0.0,
sort.list(x)
whenis.object(x)
was true, e.g., forx <-I(letters)
, was accidentallyusingmethod = "radix"
. Consequently,
e.g.,merge(<data.frame>)
was much slower than previously; reported in
PR#17794.
How to change Sys.setlocale, when you get Error request to set locale … cannot be honored
From above comments, this is not possible
Related Topics
Remove 'Search' Option But Leave 'Search Columns' Option
Sum of Two Columns of Data Frame with Na Values
Coloring Boxplot Outlier Points in Ggplot2
Create Barplot from Data.Frame
Collapse All Columns by an Id Column
How to Create a Bar Plot for Two Variables Mirrored Across the X-Axis in R
Add a New Column Between Other Dataframe Columns
Double Clustered Standard Errors for Panel Data
How to Read Data with Different Separators
Harnessing .F List Names with Purrr::Pmap
Read Multiple Xlsx Files with Multiple Sheets into One R Data Frame
Filter a Vector of Strings Based on String Matching
Real Cube Root of a Negative Number
In R, Getting the Following Error: "Attempt to Replicate an Object of Type 'Closure'"