Re: [R] load ing and saving R objects

From: Wiener, Matthew <matthew_wiener_at_merck.com>
Date: Tue 14 Jun 2005 - 23:15:32 EST


This may not be quite the answer you're looking for, but I sometimes save each such object in its own file (usually <object.name>.RData). Then, if you know which objects you're looking for, you know their names, and can load the individual files.

Hope this helps,

Matt Wiener

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Richard Mott Sent: Tuesday, June 14, 2005 9:03 AM
To: r-help@stat.math.ethz.ch
Subject: [R] load ing and saving R objects

Does anyone know a way to do the following:

Save a large number of R objects to a file (like load() does) but then read back only a small named subset of them . As far as I can see, load() reads back everything.

The context is:

I have an application which will generate a large number of large matrices (approx 15000 matrices each of dimension 2000*30). I can generate these matrices using an R-package I wrote, but it requires a large amouint of memory and is slow so I want to do this only once. However, I then want to do some subsequent processing, comprising a very large number of runs in which small (~ 10) random selection of matrices from the previously computed set are used for linear modeling. So I need a way to load back named objects previously saved in a call to save(). I can;t see anyway of doing this. Any ideas?

Thanks

Richard Mott  

-- 
----------------------------------------------------
Richard Mott       | Wellcome Trust Centre 
tel 01865 287588   | for Human Genetics
fax 01865 287697   | Roosevelt Drive, Oxford OX3 7BN


______________________________________________
R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
______________________________________________
R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jun 14 23:20:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:34 EST