简体   繁体   English

在R 3.1.2上安装软件包时出错

[英]Error installing packages on R 3.1.2

I have just installed R and I just came up with this error on the first time I ran R: 我刚刚安装了R,并且在我第一次运行R时就想到了这个错误:

Error installing package: Erro: ERROR: no permission to install to directory 'C:/Program Files/R/R-3.1.2/library' 错误安装软件包:错误:错误:没有权限安装到目录'C:/ Program Files / R / R-3.1.2 / library'

How can I fix this? 我怎样才能解决这个问题?

Answer 4.2 in the FAQ's gives the solution . 常见问题解答中的答案4.2给出了解决方案

My preference is to create a .Renviron file in my Working Directory, and add a line to it containing: 我的首选是在我的工作目录中创建一个.Renviron文件,并在其中添加一行,其中包含:

R_LIBS=C:/working/RS

Your Working Directory is set on the menu at: 您的工作目录在以下菜单上设置:

Tools -> Global Options -> Default working directory (when not in a project):

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM