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
Richard Mott wrote:
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.
Save them to individual files when you generate them?
I would suggest saving each object to an individual file with
some sort of systematic file name. That way, you can implement a
rudimentary key-value database and load only the objects you
want. You might be interested in the 'serialize()' and
'unserialize()' functions for this purpose.
If
On Tue, 14 Jun 2005, Barry Rowlingson wrote:
Richard Mott wrote:
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.
Save them
Thanks everyone for help on this. It looks like the solution is a
zillion files.
Richard
--
Richard Mott | Wellcome Trust Centre
tel 01865 287588 | for Human Genetics
fax 01865 287697 | Roosevelt Drive, Oxford OX3 7BN
files in a directory.
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 14, 2005 10:41 AM
To: Barry Rowlingson
Cc: r-help@stat.math.ethz.ch; Richard Mott
Subject: Re: [R] load ing and saving R objects
On Tue, 14 Jun 2005, Barry Rowlingson
On 6/14/05, Richard Mott [EMAIL PROTECTED] wrote:
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