Unable to install any packages on R

1.2k views Asked by At

I am trying to install packages for a spatial data course however each package I try install to R I get this same error message

Warning in install.packages :
  'lib = "C:/Users/chris/OneDrive/Documents/R/win-library/3.4"' is not writable

I have made a folder under R in documents for 3.4.

I also get this error message;

cannot create dir 'C:\Users\chris\OneDrive\Documents\R\win-library\3.4\file2d1c49893057', reason 'No such file or directory'
Error in install.packages : unable to create temporary directory ‘C:\Users\chris\OneDrive\Documents\R\win-library\3.4\file2d1c49893057’

I don't understand whether I have to create a new directory before I install an R package or if I have a setting that prevents it from being able to install packages?

I have installed packages before/had R for 2 years and never had this issue....

0

There are 0 answers