我让R工作得很好,直到我决定升级到3.4。现在我无法安装软件包。
安装软件包时出现错误
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages("ggplot2") :
'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (y/n)
如果我点击是,我会
Would you like to create a personal library
NA
to install packages into? (y/n)
此时它会继续发出此错误
Error in install.packages("quantstrat") : unable to create ‘NA’
答案 0 :(得分:1)
我不知道为什么R 3.4.1改变了库路径。要将其更改回来,只需修改STORAGE_IDENTIFICATION
:
/etc/R/Renviron
评论$ sudo gedit /etc/R/Renviron
然后取消注释R_LIBS_SITE=...
R_LIBS_USER=...