[R] Saving objects in RData file in different name

Jeremie Juste jerem|eju@te @end|ng |rom gm@||@com
Sat Jul 28 16:42:24 CEST 2018


Christofer Bogaso <bogaso.christofer using gmail.com> writes:

Hello

In case you have conflicting data issue when you load data, you can also do it the other way around. Indeed you never know when a possible conflict might occur in the future.
The following line load the data in a new environment e first then get it back to your current environment.

loaded..data <- get(load("test.RData",e<- new.env()),e)

you might then want to remove everything in that enviromnent afterwards,

rm(list=ls(envir=e1), envir=e1)

HTH

Jeremie




More information about the R-help mailing list