0

I keep getting this message when I try to update or install packages:

lib= "C:/Users/Soren/OneDrive/R/win-library/3.5"' is not writable

enter image description here

p.s. I'm a newbie and cannot figure out how to set the libpath to NOT go to Onedrive

nbk
  • 45,398
  • 8
  • 30
  • 47
Mark
  • 1

2 Answers2

0

Hi and welcome to stackoverflow, this issue was discussed here link to answer. Essentially you cannot write to that folder, so first close R and use Rstudio as administrator and try again. If that does not work and you have another place where you want to install packages then just specify it like this: install.packages("mynewlibrary", lib = C:/path/to/new/writable/directory). I can't remember if the paths in windows are forward slash or double backslash though. Hope this helps you out

0

.libPaths('C:/Users/Soren/PathTo/Avoid/Stupid/OneDrive/R/win-library/3.5')

or if you have some packages already installed in the OneDrive folder, to append:

.libPaths(c('C:/Users/Soren/PathTo/Avoid/Stupid/OneDrive/R/win-library/3.5', .libPaths()))

Marcus
  • 3,478
  • 1
  • 7
  • 16