使文件可写以添加新包

ang*_*ngs 6 windows r

我使用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’
Run Code Online (Sandbox Code Playgroud)

如何使此文件可写?

小智 5

将R文件夹上的安全设置更改为"完全控制"为我解决了这个问题.有关分步说明,请参阅此链接中的第三个帖子:无法在Windows 7上更新默认库中的R包