標籤:

R語言 安裝完軟體後如何進行界面語言的設置?

安裝完軟體後發現語言自動成了日文,想改成英文。我是用mac版的,網上暫時沒該版本設置界面語言的相關信息,希望有專業人士能指點迷津。謝謝。


找到程序安裝的文件夾。一般是program files &>&> R &>&> R-3.2.1, 然後有個名字是 etc 的文件夾,

然後點擊Rconsole, 選擇打開程序是notebook, 中文是記事本的txt程序。

找到 language 那一欄,原先在default 設定下應該是空的,現在你可以更改成你想要的任何語言。 我選擇english, 只要輸入en 在等號之後就可以了。

然後保存。

但是,保存的時候,windows會問你,你不是管理員,沒有許可權。使用個人電腦的話,只要自己給自己賦予許可權就好了。因為pc的話,有兩個系統設定賬號,一個是管理員,一個是使用者。賦予許可權給使用者,使之可以『修改Rconsole』的話,只要右擊Rconsole那個文件, 點擊屬性。

點擊使用者, 點擊編輯。然後全打勾就行了。

再執行以下修改語言的那個操作,R 的語言就成了英文的了。

以下我看到的別人寫的英文說明。

"I read FAQ on CRAN, but it was a bit confusing to a novice like me. So here is the screenshot. First, go to the "etc" folder under R program files folder. Then locate Rconsole file. Find the line "language = ", change it to "language = en" if you want to run R in English. Save the file. Windows (I am using Windows 7.) told me that I have no permission to change the Rconsole file and that I should contact the administrator. Thank you. ! I am the administrator/user. I had to right click on the Rconsole file icon, select Property and grant a permission to modify the file to myself, the user."

How to change language setting of R on Windows: Sociological Inquiry


在人大經濟學論壇上看見針對windows系統下改變語言的非常簡單的解決方案,右鍵單擊桌面上R語言的圖標,點擊彈出窗口中的屬性,在屬性窗口的目標框中最後的的Rgui.exe"後面加上空格以及language=English,即

「...Rgui.exe"[空格]language=English

點擊確認關閉屬性欄,再打開R時就變成英文的界面了。

原帖鏈接 [求助]如何將R的中文界面轉化成英文界面!!


Internationalization of the R.app

R and the R.app GUI introduced
support for internationalization in R 2.1.0. Among other things this means that
both messages and GUI elements can be translated into various languages. R.app automatically detects user"s settings in the
International section of the System Preferences and uses that
information to offer translated messages and GUI if available. Please note that
both Language and Formats information is used so they should
be set up consistently.

If you use a non-standard setup (e.g. different language than formats), you
can override the auto-detection performed by setting `force.LANG" defaults setting, such as for example

defaults write org.R-project.R force.LANG en_US.UTF-8

when run in Terminal it will enforce US-english setting regardless
of the system setting. If you don"t know what Terminal is you can use
this R command instead:

system("defaults write org.R-project.R force.LANG en_US.UTF-8")

but do not forget to quit R and start R.app again afterwards. Please note that you must always use
`.UTF-8" version of the locale, otherwise
R.app will not work properly.

By default R.app uses UTF-8 for newly created documents
and for the console. When opening new documents R.app
assumes UTF-8 and only if the document violates UTF-8 rules, it will try to
fallback to legacy encoding, usually Mac Roman.

以上是R語言官方提供的解決方案,意思就是在控制台里輸入上述兩條命令,你估計用的是日文操作系統,所以系統自己默認設置為日文


試試這個鏈接裡面的建議:R for Mac OS X FAQ


我和題主一樣用的是mac系統,樓上幾條回答主要是針對windows系統的。針對Mac的那條回答我也嘗試過了,然而並不管用。

有用的是我發現R語言在安裝過程中會自動檢測系統語言,並按照系統語言進行安裝。然而R的語言檢測真是令人啼笑皆非,愣是把中文操作系統檢測為日文。

所以最簡單粗暴的方法是,卸載R--&>把系統語言改成英文--&>重啟mac--&>重裝R--&>把系統語言改回中文。

在網上試過無數寫代碼改代碼替換文件等等方法,盡皆無效。這個沒有任何技術含量的方法,親測有效。

歡迎轉載,廣而告之!


給力,終於改成英文界面了!多謝!


推薦閱讀:

有哪些比較好的R語言網路視頻教程推薦?
如何理解R中因子(factor)的概念?
R語言在哪些情況下for循環可以避免?
R語言分層抽樣的函數是什麼?
r語言中句號(點號)「.」的含義是什麼?

TAG:R編程語言 |