1 | initial version |
Follow these steps to configure the locale for R on macOS M1:
Type the following command and press enter:
sudo nano /etc/locale.gen
Type your password if prompted and press enter.
Type the following command and press enter to generate the new locale:
sudo locale-gen
Type the following command and press enter to update the system’s locale:
sudo update-locale LANG=en_US.UTF-8
Close the terminal app and restart your computer for the changes to take effect.
Open R and check that the locale has been set correctly by typing the following command in the console:
Sys.getlocale()
This should return "en_US.UTF-8" indicating that the locale has been set correctly.