Multiple R versions
1
0
Entering edit mode
pawan12394 • 0
@pawan12394-20050
Last seen 5.1 years ago

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 ?

R bioc • 1.9k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 6 weeks ago
United States

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

ADD COMMENT

Login before adding your answer.

Traffic: 771 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6