这是我的sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Chinese (Traditional)_Hong Kong S.A.R..950
[2] LC_CTYPE=Chinese (Traditional)_Hong Kong S.A.R..950
[3] LC_MONETARY=Chinese (Traditional)_Hong Kong S.A.R..950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Hong Kong S.A.R..950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_2.14.0
我尝试使用
Sys.setlocale("LC_TIME", "en_US.UTF-8")
在日期中转换输出,但是它给了我这个错误:> Sys.setlocale("LC_TIME", "en_US.UTF-8")
[1] ""
Warning message:
In Sys.setlocale("LC_TIME", "en_US.UTF-8") :
OS reports request to set locale to "en_US.UTF-8" cannot be honored
我想知道为什么以及该怎么办?谢谢。
最佳答案
对于Windows:
Sys.setlocale("LC_TIME", "English")
关于r - 更改R的时间区域设置,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8145886/