R - 如何在安装软件包时设置默认语言环境

时间:2016-07-18 16:12:49

标签: r packages

> install.packages("ISLR")
trying URL 'https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.3/ISLR_1.0.tgz'
Content type 'application/x-gzip' length 2914144 bytes (2.8 MB)
==================================================
downloaded 2.8 MB

tar: Failed to set default locale

1 个答案:

答案 0 :(得分:1)

在终端写这个

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

重启R

...或在R控制台中写这个

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

重启R