Hi @Maqa. We'll need more information in order to help you properly—for example, if you could fill out some of the fields from the troubleshooting guide (eg. system information), and quote the error you're getting word for word, we can start figuring things out
I am copying and pasting word to word the message I received. In Italics is what I typed in and after that the output I received. I recived multile of the errors as mentioned below but since I am a new user I can only put 2 liks in my post
I hope you can help. Thank you in anticipation.
Below is the word to word error.
> _install.packages("readr")_
Installing package into ‘C:/Users/maqad/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
'lib = "C:/Users/maqad/Documents/R/win-library/3.5"' is not writable
Error in install.packages : unable to install packages
> _install.packages("dplyr")_
Installing package into ‘C:/Users/maqad/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
'lib = "C:/Users/maqad/Documents/R/win-library/3.5"' is not writable
also installing the dependencies ‘utf8’, ‘bindr’, ‘cli’, ‘crayon’, ‘fansi’, ‘pillar’, ‘purrr’, ‘assertthat’, ‘bindrcpp’, ‘glue’, ‘magrittr’, ‘pkgconfig’, ‘R6’, ‘Rcpp’, ‘rlang’, ‘tibble’, ‘tidyselect’, ‘BH’, ‘plogr’
I just tried to install the package 'evaluate' and this is the message I received.
Warning in install.packages :
cannot create dir 'C:\Users\maqad\Documents\R\win-library\3.5\file29cc3d7551b8', reason 'No such file or directory'
Error in install.packages : unable to create temporary directory ‘C:\Users\maqad\Documents\R\win-library\3.5\file29cc3d7551b8’
install.packages("evaluate")
Installing package into ‘C:/Users/maqad/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
'lib = "C:/Users/maqad/Documents/R/win-library/3.5"' is not writable
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/evaluate_0.12.zip'
Content type 'application/zip' length 73354 bytes (71 KB)
downloaded 71 KB
Warning in install.packages :
cannot create dir 'C:\Users\maqad\Documents\R\win-library\3.5\file29cc38733404', reason 'No such file or directory'
Error in install.packages : unable to create temporary directory ‘C:\Users\maqad\Documents\R\win-library\3.5\file29cc38733404’
I just opened RStudio as an administrator and installed a package, but I am still unable to install it. I have added an image of the message I received.
This seems really complicated. I hope you can help.
Let's back up a little bit, @Maqa. As @andresrcs notes, it seems like there's a permissions problem here: R wants to download and install your packages to a directory in C:\Users\maqad\Documents\R\win-library\3.5 (called your library), but it doesn't have permission to do it.
We more often see these problems with people who're running R on a network and have a shared network disk that they store stuff on, but that doesn't seem to be the case here.
One thing we could try is verifying that this directory hasn't been locked for some reason. Here's a great guide to setting permissions for a directory on Windows:
Another option is to install your packages somewhere else. Here's how to select a different library directory in which to install your packages:
I did check the permissions and allowed myself and my system full access since no one else uses my computer.
I hope that doesn't create problems in the future