How to change the locale of R in RStudio? -
i’m using r version 2.15.3 (2013-03-01) on ubuntu 12.10. system in german , r. comes unhandy when searching error messages.
executing r in xterm way $ lang="c" r
partially solves issue. r displays in english. when loading rstudio way, r interpreter still in german. i’m looking way change locale of r in r itself.
i found this: how change language settings in r, sys.setenv(lang = "en")
does’t work me:
2+x # fehler: objekt 'x' nicht gefunden sys.setenv(lang = "en") 2+x # fehler: objekt 'x' nicht gefunden
i tried sys.setenv(lang = "en_us.utf-8")
no success.
output of sys.getlocale()
sys.getlocale() # [1] "lc_ctype=de_de.utf-8;lc_numeric=c;lc_time=de_de.utf-8; # lc_collate=de_de.utf-8;lc_monetary=de_de.utf-8;lc_messages=de_de.utf-8; # lc_paper=c;lc_name=c;lc_address=c;lc_telephone=c;lc_measurement=de_de.utf-8; # lc_identification=c"
(linebrakes added convenience)
just had same problem , found solution worked me on windows/linux:
sys.setlocale("lc_all","english")
Comments
Post a Comment