問題
在資料中有中文字,每次進 RStudio 時都要手動執行 Sys.setlocale(category="LC_ALL", locale = "cht") 將語系改成 CP-950。
做法
在專案目錄下新增一個 .Rprofile 的檔案,加入 Sys.setlocale(category="LC_ALL", locale = "cht") 指令。如此,在開啟專案時便會自動執行 .Rprofile 內的指令[1]。
參考資料
[1] Josh Paulson, 2017/1/22, Using Projects, https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects, Accessed on 2017/3/18
沒有留言:
張貼留言