6

I have the R software installed on my MacBook, but the problem is that the default language is set on "russian", I really don't know why. When I call R from my terminal I see the message below

Giulios-MBP:~ opisthofulax$ R

R version 3.2.4 (2016-03-10) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
R version 3.2.4 (2016-03-10) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)

R -- это свободное ПО, и оно поставляется безо всяких гарантий.
Вы вольны распространять его при соблюдении некоторых условий.
Введите 'license()' для получения более подробной информации.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Введите 'demo()' для запуска демонстрационных программ, 'help()' -- для
получения справки, 'help.start()' -- для доступа к справке через браузер.
Введите 'q()', чтобы выйти из R.

> 

As you can notice the software is half in russian half in english, and, obviously, I would like to change the default language to ENG.

I've found a temporary solution here on StackOverflow but it doesn't solve my problem, because every time I call R from my terminal it's again in RUS.
I was wondering if there's a definitive solution/command to change and set the default language to ENG. Thanks all.

= I didn't get the problem solved, since, even if I took a look here, on the other SO link.
I wasn't able to locate the file Rconsole, which seems to be the key to change the language.
I looked for it on my MacBook (and maybe the problem is because of the new Sierra OS) with the search tool, but the file seems not to be on my computer.
So the problem is actually still there. Any suggestion?

M--
  • 25,431
  • 8
  • 61
  • 93
opisthofulax
  • 517
  • 8
  • 25
  • 3
    Also take a look at [This SO Post](http://stackoverflow.com/questions/12760491/the-r-console-is-in-my-native-language-how-can-i-set-r-to-english) – G5W Dec 27 '16 at 22:34
  • I had a look, but none of them solved my problem... – opisthofulax Dec 28 '16 at 20:29

2 Answers2

6

There are several questions dealing with that problem:
- How to change language settings in R
- The R console is in my native language, how can I set R to English?

Type locale in the terminal and check your language settings. If you want everything to be in US english, it should look like this

locale 

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

In your case, I assume that it is a mix of en_US.UTF-8 and your local russian language setting.

These variables are set system wide by your language & region settings. However, you can also set them in your ~/.bash_profile. For example, I use the following settings:

# language settings
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Restart R/RStudio and everything should work.

Community
  • 1
  • 1
pat-s
  • 5,992
  • 1
  • 32
  • 60
  • Great! You solved my problem! Actually I had this configuration of `locale`: `Giulios-MacBook-Pro:~ opisthofulax$ locale LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL=` But i typed this 2 `export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8` and everything was ok. I restarter R and now it's all in english. Finally I had this problem solved out! – opisthofulax Dec 28 '16 at 20:27
0

Also, this worked for me, OS X Big Sur with R console from Anaconda.

  1. which R showed /opt/anaconda3/envs/rm_resolutions/lib/R/bin/R
    1. Good, it's using Anaconda
    2. (rm_resolutions is my active virtual environment)
  2. cd /opt/anaconda3/envs/rm_resolutions/lib/R/etc
  3. Do at least one of these:
    1. Add LANGUAGE=en to the Renviron file there.
    2. Create Rconsole with language = en
      • For example, echo language = en > Rconsole

I did both of step 3, not sure which is used / preferred.

I also have the R.app installed, which is totally separate.

ctwardy
  • 172
  • 7