使文件可写以添加新包 [英] Make a file writable in order to add new packages

查看:30
本文介绍了使文件可写以添加新包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Rstudio 并尝试通过命令控制台添加新包.

I use Rstudio and try to add new packages through command console.

因为这个原因安装失败

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

Changing the security setting on the R folder to "full control" fixed this for me. See the third posting down at this link for step by step instructions: Unable to update R packages in default library on Windows 7

这篇关于使文件可写以添加新包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆