2

I'm unable to get RStudio to correctly identify my locale. The output from locale is:

LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8

I changed LC_ALL and LC_MEASUREMENT from en_GB.utf8 -> en_US.utf8 in my ~/.bashrc based on this SO question. However I still get:

Beim Start - Warnmeldung:
Setting LC_MEASUREMENT failed, using "C"

Could somebody explain where RStudio tries to read its locale settings, and how I can correct this? If I launch R from the terminal I don't have this problem, it correctly reads my locale. I needed the LC_MEASUREMENT value to be read correct so that I can install a package (ggbiplot). (In the end I used the R from the terminal to install the package but I'd like to 'fix' RStudio. Thanks.

Info: R version 3.5.1 Platform: x86_64-redhat-linux-gnu (64-bit) RStudio: 1.1.463

Jason
  • 4,346
  • 10
  • 49
  • 75
  • Have you tried putting settings into an Renviron or Renviron.site file? See ?Startup in R for details. – user2554330 Oct 31 '18 at 17:54
  • @user2554330 No I haven't. From reading `help('Startup')` Rstudio `R searches for site and user files to process for setting environment variables.` It seems like this is the case for R but not for RStudio. Do you know how to properly format a `R_ENVIRON` file to point to `locale`? Is there a way to direct it to `~/.bashrc`? Do you know how I can get RStudio to print the locations it searchs for `locale` information? – Jason Oct 31 '18 at 23:33
  • 1
    The format of the Renviron file is the same as the output of `locale`, i.e. a series of `variable = value` settings, one per line. As far as I know it needs to be produced before R starts, there's no way to ask R to run `locale`. No idea about the other questions. – user2554330 Nov 01 '18 at 00:21

0 Answers0