RStudio & R Users in Regulated Environments -- Old Versions and Non-Admins

I am using R as part of a government contract on government issued hardware. I am not an administrator of the computer although R can process and install packages. Unfortunately, updating both R and RStudio require admin permissions on my machine. That said, I am running R 3.4.3.

I am trying to use packrat to begin a new isolated project library for interchangeability and reproducibility. I have created a new project and a packages library folder. I am redirecting .libPaths() to the new library folder. I have been trying to install the packrat package first with dependencies as I would like to rely on its utilities as soon as possible.

In doing this I have been getting errors such as "ERROR: dependencies 'usethis', 'callr' are not available for package 'devtools'. These then require me to step back, find the packages that they are missing (unlisted dependencies it seems) and install those, then try again. This process has become a search for the grail. By grail, I mean the primordial first package -- that package or set of packages that once installed all subsequent packages will install without error.

Upon searching for these package installation and clean install errors, I see that basically folks with older versions of R run into this type of issue often. It would be great if the powers that be would improve backward compatibility and useability under non-admin standing. R is such a powerful tool and becoming much more widely used. However, there are many barriers to use including an extremely steep learning curve, little to no backward compatibility, and errors which quickly devolve into the deep end. A user shouldn't need to learn the inner workings of install.packages, dependencies, and package development in order to get up and running.

There are numerous contexts -- corporate systems, university systems, government, data lakes, private datasets on air-gapped systems, etc -- where admin rights and quick update adoption cannot be assumed. The assumption of near-immediate update adoption is a fatal misunderstanding between developers and users. It has and continues to greatly hamper the adoption of R and RStudio by regulated users. Developers writ large need to consider those who may still be using "outdated" systems because it is out of the user's control due to security, IT policy, or inavailability.

Here is a presentation that was given about this exact issue about the use of R and the FDA's requirements for software validity and replication of results. Unfortunately, it appears that little has changed from 2007 to now. The presenter's suggestions are still wildly applicable for R developers in relation to useRs in regulated contexts:

* ... validation, documentation, and accountability are required of sponsors relying on R.
* A public listing of validated R functions would
**be a great benefit to FDA reviewers and sponsoring
**exceed current standards - R sets the standard!

A few examples:

  • IT was allowed to install R, but was not aware whether TeX was permitted and did not install it.
  • Rtools similarly was not installed because not explicitly approved for installation in advance by IT (this process of reviewing programs for install/update can take >3 weeks)
  • packrat is failing because it can't "tangle", this appears to be related to the absence of TeX
  • RStudio keeps prompting to install uninstalled features of Rtools to make up for these problems which as a user in a regulated environment I am unable to do...
  • Extensive access violation and Error 5: Access is denied errors due to this
  • Complete dependence on Rtools (which is not natively installed with RStudio or R so completely hamstrung for progress or use of packrat
  • Unpredictable execution and tool use as some packages programmed around these problems and others haven't
  • Because some packages are installed but certain features don't work without access to Rtools, other packages attempt to install thinking that its dependency A is present (because it is) but then fail to execute because A.TeXreliantFunction() fails to compute.

Hi @cochetti,

Thanks for this feedback. As a former government contractor working on GFEs, I feel your pain. packrat only depends on tools and utils (part of a base R install), so you should be able to install without the suggested packages. This stack overflow post has some nice information on how that works. There may be some functionality you can't use, but install should work ok.

On the more general topic of package management, you might find helpful in terms thinking about package management strategies.

Your use case is exactly why we developed RStudio Package Manager, which can really help with R package and system dependency management in validated/air-gapped environments. Unfortunately, it sounds like you have limited ability to do any sort of acquisition, but you might find the features interesting to know about.