I am trying to change the system locale in r studio.
I used this code:
Sys.setlocale("LC_ALL","English") But when I restart Rstudio it reverts back to the previous locale
How can I fix this issue?
I am trying to change the system locale in r studio.
I used this code:
Sys.setlocale("LC_ALL","English") But when I restart Rstudio it reverts back to the previous locale
How can I fix this issue?
You could create or edit .Rprofile, at user's level, or at project's level, see.
For all R sessions (and hence RStudio sessions), this should work:
file.edit(file.path("~", ".Rprofile")) add in .Rprofile:
Sys.setlocale("LC_ALL","English") etc/ directory each R installation has and to set Rprofile.site. Or. of you wish use Renviron.site which can use the short LC_ALL=English form as could ~/.Renviron. It all amounts to the same: set the env var when R starts as it cannot be set later. All this is detailed in help(Startup) which has been referenced a few times here over the years.