Make the file writable to add new packages

I am using Rstudio and trying to add new packages through the console.

Unable to install it for this reason.

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' 

How to make this file writable?

+5
source share
3 answers

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

+5
source

Just run RStudio as an administrator. Right-click on it and select "Run as administrator"

+2
source

I ran into this problem. The problem for me was to use single quotes instead of double quotes. Using install.packages("foo") worked fine, while install.packages('foo') caused this problem.

0
source

All Articles