RStudio does not like Uniform Naming Convention (UNC) paths. This can be a problem if, for example, you install it under Citrix. The solution is to create a suitable environment file.
.Renviron file with the following contents:
Your choice of folders might be slightly different (especially if you are using a different version of R!), but it should be essentially the same as that above.
Default Working Folder
Of course, it’s important that RStudio can find your
.Renviron file. By default it looks in your home folder. To check on your home folder location, open a new R session and then do the following:
> Sys.getenv("HOME") > Sys.getenv("R_USER")
The result of both commands should be the same, probably a
Documents folder on the
C: drive. This is where you need to stash your
You can also create a
.Rprofile file in the same folder. The contents of this file will be executed at startup, but after any environment changes specified in
To change your initial working folder to
.Rprofile would look like this: