I am having numerous issues working with R (3.6.3) and RStudio (1.2.5033) on a network mapped drive (U:) while teleworking. Here are the gory details. There are two key issues. First, I can't seem to create new projects anywhere but my home directory (U:\Documents). Second, I can't seem to save R scripts (complaints about invalid extension).
- I am working on a Windows 10 system with my home directory on U:\Documents which is synonamous with C:\Users<account>\Documents
1. Clear out old installations.
- Uninstall RStudio (via add/remove programs)
- Uninstall R (via add/remove programs)
- Delete all installed packages (manually delete everything in c:\Users<account>\Documents\R\Libraries, which is where I have defined R_LIBS_USER)
- Delete everything in c:\users<account>\dowloads (overkill, but just to be sure)
2. Fresh installations.
- Installed R (3.6.3) using defaults for all options (in prior installs, I was unchecking the 32-bit veresion and creating shortcuts).
- Test R-GUI (32 and 64-bit versons). Seems to work.
- Install RStudio desktop for Windows (1.2.5033) using defaults for all options
- Launch RStudio. (interestingly it tried to open a pakage I tried to create and then deleted, so some data had been saved somewhere).
- tools->check for package updates (all packages up to date)
3. Create a new project with devtools
- files->new project->new directory->R package using devtools
- get "new project" dialog with "Create R package using devtools" in title. Asks for "Directory name" (blank default) and "create project as subdirectory of" ("~/" default).
- Use "browse" button on "create project as subdirectory of" to navigate to directory where I want to create package (~/xyzzy). When I click on "open" it returns me to dialog, but nothing has changed (still has "~/" as the value).
- This is not looking promising. Same bad behavior as before, but I persist. Just set directory name to "newproject" and proceed to click "Create Project"
- Get an "install packages" dialog indicating that creating a project with devtools requires an updated version of the devtools. I consent to "install this package now."
- Lots of stuff gets installed in U:\Documents\R\Libraries (value of R_LIBS_USER). Same as C:\users<account>\Documents\R\Libraries. This takes a while.
- So, now I have a skeletal project in U:\newproject (not in U:\xyyzzy\newproject as I wanted, but I'll live) and a bunch of libraries intalled in U:\Documents\R\Libraries.
4. Try to create a new R script
- Try to create an R script file. File->New File->R Script pops up an untitled tab. OK. But now I seem to have two RStudio sessions open. One with the new untitled tab and the other without. Both have the new project open. I try close the window without the new untitled tab. I get an R session aborted error on the session with the new untitled tab. So, now I'm going to try to shut both down and relaunch.
- The window without the new untitled tab takes forever to shutdown (like more than 5 minutes. It's only using minimal CPU). I can't just "close window." I kill it with task manager.
- I relaunch. File->Recent Projects->newproject gets me to the project. File->New File->R Script brings up a new "untitled" tab.
- File->Save brings up a dialog with the default directory correctly set to the R subdirectory. I type in "getData.R" and click save. I get a dialog "The file was created as an R script however the extension you specified will change it into a file type that will no longer open as an R script. Are you sure you want to change the type of the file so it is no longer an R script?" I select "No." I get the same response with "getData" and "getData.r"
Something is broken. I suspect it's due to the mapped drive. Are there additional environment variables I need to set?