[R] load object

Weiwei Shi helprhelp at yahoo.com
Thu Jan 13 20:00:21 CET 2005


Hi,
I happen to re-write my codes to save memory and my
approach is write my obj into file first and later I
load it.

However, it seems like:
load(filename) can load the object but the function
returns the name of the object instead of the
reference to it. For example, I have an object called
r0.prune, which is saved by
save(r0.prune, file='r0.prune')

and later, I want to load it by using:
load('r0.prune')
but I need to put the reference to the object r0.prune
into a var or a list. I tried:
t<-load('r0.prune'),
and class(t) gave me a char, which means t stores the
name of obj instead of the obj itself.

Sorry for the dumb question but please help...

Weiwei




More information about the R-help mailing list