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
p.s. I'm a newbie and cannot figure out how to set the libpath to NOT go to Onedrive
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
.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()))