This environment variable "R_TESTS" is set during testing, and it points to a file called Startup.Rs
that is placed in the .libPaths()
. If the .libPaths()
is changed during the testing, then that file will not be found, and install.packages will fail to install a package with an error of source file not found. See: https://github.com/HenrikBengtsson/startup/issues/19.
Useful links