R 的默认语言

opi*_*lax 5 macos r

我的 MacBook 上安装了 R 软件,但问题是默认语言设置为“俄语”,我真的不知道为什么。当我从终端呼叫 R 时,我看到以下消息

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.

> 
Run Code Online (Sandbox Code Playgroud)

如您所见,该软件一半是俄语一半是英语,显然,我想将默认语言更改为 ENG。

在 StackOverflow 上找到了一个临时解决方案 但它并没有解决我的问题,因为每次我从终端调用 R 时,它又是在 RUS 中。
我想知道是否有明确的解决方案/命令可以更改并将默认语言设置为 ENG。谢谢大家。

= 我没有解决问题,因为,即使我在这里,在另一个 SO 链接上
我找不到文件Rconsole,这似乎是更改语言的关键。
我使用搜索工具在我的 MacBook 上寻找它(也许问题是因为新的 Sierra 操作系统),但该文件似乎不在我的电脑上。
所以问题实际上仍然存在。有什么建议吗?

pat*_*t-s 5

有几个问题可以解决这个问题:
-如何在 R 中更改语言设置
- R 控制台是我的母语,我如何将 R 设置为英语?

输入locale终端,并检查您的语言设置。如果您希望所有内容都使用美式英语,则它应该如下所示

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"
Run Code Online (Sandbox Code Playgroud)

在您的情况下,我假设它是en_US.UTF-8您当地的俄语环境的混合体。

这些变量由您的language & region设置在系统范围内设置。但是,您也可以在~/.bash_profile. 例如,我使用以下设置:

# language settings
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
Run Code Online (Sandbox Code Playgroud)

重新启动 R/RStudio,一切正常。