Rstudio hanging when using R installed in network drive

Hi R Studio fans,

Looking for some advice on a set-up I have between home and the office. I have R installed on a network drive which allows me in theory to use it between a home laptop and an office PC. My method is that I have a local installation of R on the laptop which I then give a path to the network drive. This has worked ok in the past, but I have an issue where after I specify the path to the network drive library and then display the library paths via:

.libPaths(c(.libPaths(), "M:/R/win-library/3.6"))

I get a very long hang (5-10 minutes) after executing the 2nd line despite it surely being a simple command. This extends to loading Bioconductor (a suite of packages within the network drive) which takes a similar unworkable amount of time. I'm wondering whether it would be related to this previous thread on issues with Rstudio with R installed on network drives though no solutions to improve speed seem to be given here:

I have a good quality internet connection but am going through a VPN to get to the drive. Would appreciate any advice to diagnose what is happening here.

Cheers, Matt

What version of RStudio are you using? The latest release of RStudio (v1.2.1335) should in theory handle these sorts of issues better, but perhaps not.

When the R library paths are changed, RStudio will attempt to re-index packages installed in those libraries. I believe that can be slower when the library is on a networked filesystem. One workaround is to disable the Packages pane, e.g. with

Enable packages pane

Thanks Kevin, no visible improvement with turning off the packages panel

Here's the output of libPaths() if it helps:

> .libPaths()
[1] "C:/Users/Matt/Documents/R/win-library/3.6" "C:/Program Files/R/R-3.6.1/library"       
[3] "M:/R/win-library/3.6"                     
Error: invalid version specification ‘NA’
In addition: Warning message:
In utils:::packageDescription(packageName, fields = "Version") :
  no package 'knitr' was found

Does seem like any work done downstream is at a reasonable speed aside from the annoyingly long start up time

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.