跳到主要內容

發表文章

目前顯示的是 3月, 2016的文章

Installing and Setting R environment variable in Windows

R 是一個 open source 的統計軟體 ,可以安裝在各種不同平台中,在 Windows 系統安裝過程相當簡單,只要下載 for Windows 版本,然後 " 下一步  >> 下一步" 就可以完成,寫這篇文章主要是要說明如何設定環境變數,讓自己可以管理自己所寫的程式碼、文件及引用常用的 library,未來系統更新時,這些重要的資料才不會因為更新版本而遺失,或者需要重新再次安裝 library。 R for Windows 的安裝程式內含 Windows x86 or x64 版本,預設是兩種版本全部安裝,安裝過程中可以使用 custom 來選擇安裝適合自己 Windows 的版本。另外, Message Translate 是翻譯的文件,是中文版的使用者翻譯文件介面,依照個人的喜好,選擇是否安裝;若安裝這個語言的套件後,也可以在 RGui Console 中: Edit >> GUI Preferences >> Language for menus and messages >>  輸入 en 做設定,必須注意:設定完 GUI Preferences 內的設定值需要將 Rconsole 檔案儲存在 HOME 的目錄,預設是 C:\Users\username\Documents 目錄,要更改 HOME 目錄,請繼續讀下面的文章。 安裝完成後開啟 Rgui.exe,在 Rgui 的 console 輸入: >??startup 其中有一段文章: R searches for site and user files to process for setting environment variables. The name of the site file is the one pointed to by the environment variable R_ENVIRON ; if this is unset, ‘ R_HOME /etc/Renviron.site ’ is used (if it exists, which it does not in a ‘factory-fresh’ installation). The name of the us