[R] load only one object from a .RData file

Henrik Bengtsson hb at biostat.ucsf.edu
Tue Apr 24 21:37:05 CEST 2012


You could do:

library("R.utils");
value <- loadToEnv("MyFile.RData")[["nameOfObject"]];

It still load all of the data, but it is not kept; only the object you grab.

/Henrik

On Tue, Apr 24, 2012 at 11:30 AM, Shi, Tao <shidaxia at yahoo.com> wrote:
> Hi list,
>
>
> Is there a way to load one specific object from a .RData file which contains multiple data objects?  Thanks,
>
> ...Tao
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list