Created
August 15, 2022 11:42
-
-
Save megpay/b02050f250897bb5092245c9a28eca1b to your computer and use it in GitHub Desktop.
Generating new locales for R to access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When working with R files created using locales that are not installed, this is how you generate new ones. | |
# Works on Ubuntu 20.04.4 LTS | |
# prints out locales that are already created and accessible. | |
locale -a | |
# generate a new one, for example French | |
locale-gen fr | |
# Update the locales so that R can access them | |
locale-update | |
# In R, use Sys.getlocale() to get all the locales that are available. | |
# Sys.setlocale("LC_ALL","fr_FR.utf8") using the locale info will set it for you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment