我使用Rstudio并尝试通过命令控制台添加新包.
由于这个原因,它无法安装它
install.packages("devtools"); devtools::install_github("hadley/rvest")
Warning in install.packages :
'lib = "C:/Program Files/R/R-3.2.1/library"' is not writable
Warning in install.packages :
cannot create dir 'C:\Users\myuser',reason 'Permission denied'
Error in install.packages : unable to create ‘C:/Users/myuser/Documents/R/win-library/3.2’
Error in loadNamespace(name) : there is no package called ‘devtools’
如何使此文件可写?
将R文件夹上的安全设置更改为“完全控制”为我解决了这个问题.请参阅此链接中的第三个帖子,了解分步说明:
Unable to update R packages in default library on Windows 7