Skip to content
Prev 306793 / 398506 Next

Having two different versions of a package in the same R installation

On Tue, Oct 2, 2012 at 4:18 PM, S?ren H?jsgaard <sorenh at math.aau.dk> wrote:
Install the two versions into two different R libraries:

install.packages("my.package", repos = ..., lib = ...) # 1st repo/lib
install.packages("my.package", repos = ..., lib = ...) # 2nd repo/lib

library(my.package, lib.loc = ...) # 1st lib
# use it
detach(my.package, unload = TRUE)
# next line may or may not be needed
library.dynam.unload("my.package", system.file(package = "my.package"))
library(my.package, lib.loc = ...) # 2nd lib