Installing multiple versions of R
Yes, this is pretty easy as Josh Ulrich's comment already says.
People usually have this question regarding r-devel installation alongside the basic R you will get from your distro. I use a simple shell script to build / update R-devel, and two matching ones to run R-devel and Rscript-devel. I can't recall if I blogged about it, but folks seem to point to an this older post on the r-sig-debian list which contains it. Here is a nice post by Michael detailing the same process.
And by creating new subdirectories, you can add as many R version as you want. You should keep the local builds in /usr/local
, though, and could create softlinks for the binaries in /usr/local/bin
. The script R
itself will have R_HOME_DIR
hard-coded and "just work".
Fancier approaches involve virtualization, and on Linux your best bet is docker which I am playing with now, and which I hope to detail at some point for this very purpose of testing R packages against multiple compilers etc.
How do you use multiple versions of the same R package?
You could selectively alter the library path. For complete transparency, keep both out of your usual path and then do
library(foo, lib.loc="~/dev/foo/v1") ## loads v1
and
library(foo, lib.loc="~/dev/foo/v2") ## loads v2
The same works for install.packages()
, of course. All these commands have a number of arguments, so the hooks you aim for may already be present. So don't look at changing R_HOME
, rather look at help(install.packages)
(assuming you install from source).
But AFAIK you cannot load the same package twice under the same name.
Install two versions of rtools
The problem was due to the fact that Microsoft R Client version 3.5.2
, was installed in a path with space E:\Program Files\Microsoft\R Client
, it was solved by installing it in a path without spaces E:\Microsoft\R-Client
, such as suggested in: Message error 'C:/Program' not found with Rcpp
Related Topics
Rsync --Exclude Not Excluding Specific Files
Getmodulehandle(Null) on Linux
Run a Command Conditionally with Netcat and Grep
Making 'Long' 4 Bytes in Gcc on a 64-Bit Linux MAChine
Bash Script to Run a Constant Number of Jobs in the Background
Difference Between Trap Flag (Tf) and Monitor Trap Flag
How to Install an Older Version of PHP Using Apt-Get
How to Enable Evp Functions in Openssl
Script That Calls Ausearch Behaves Differently When Piped Data on Stdin
Linux /Bin/Sh Check If String Contains X
Xclip Does Not Terminate When Tracing It
How to Retrieve Advertising Payload from Ibeacon/Ble
Coqide 8.5: No Syntax Highlighting on Linux
Windows Equivalent of ./ (Current Directory)
Find Command to Find Files and Concatenate Them