I am currently using R-3.5.2 and I need R-3.4.2 to install certain genomic libraries. Is there a way I can run both R versions? How do i change the R version to use ?
I am currently using R-3.5.2 and I need R-3.4.2 to install certain genomic libraries. Is there a way I can run both R versions? How do i change the R version to use ?
The basic approach is to install both versions of R, and to maintain separate libraries of packages installed in one version versus another. Maintain separate libraries using the R_LIBS_USER
environment variable or perhaps other approaches to setting .libPaths()
; see ?.libPaths
. Your operating system provides ways to conveniently invoke one R version versus another; on Linux / macOS I would use aliases
alias R-3.5.2="R_LIBS_USER=/path/to/R-3.5.2/library /path/to/R-3.5.2/bin/R"
With RStudio a similar technique uses the environment variable RSTUDIO_WHICH_R
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.