Search code examples
rstudioonedrive

How to resolve the access is denied error in RStudio?


I just installed RStudio on a new desktop PC that has Windows 10 installed. Then I synced my OneDrive to this PC and opened a RStudio project which is in OneDrive. Whenever I click on a script file to open it from within RStudio, I see the following error:

enter image description here

What I tried

I have tried pausing OneDrive and reopening RStudio but get the same error. Please guide me on how to fix this.


Solution

  • This was a OneDrive issue. By unchecking the last option in the settings (shown below), all the files were downloaded. Now I can open the script files in RStudio.

    enter image description here