[R] loading into a list

Prof Brian D Ripley ripley at stats.ox.ac.uk
Tue Apr 20 16:06:25 CEST 2004


Try .saveRDS/.readRDS which enable you to save and load unnamed objects (in
your case list(A, B, C)).

On Tue, 20 Apr 2004, Tamas Papp wrote:

> I have the following problem.
>
> Use the same algorithm (with different parameters) to generate
> simulation results.  I store these in variables, eg A, B, C, which I
> save into a file with
>
> save(A, B, C, file="solution001.Rdata")
>
> I do this many times.  Then I would like to load the above, but in
> such a manner that A, B, C woule be part of a list, eg
>
> sol001 <- loadIntoList("solution001.Rdata")
>
> so that sol001 is a list with elements A, B, C.
>
> I am looking for a way to implement the above function.  The variables
> are very large and I need a lot of time to compute them, so saving &
> loading the results is the only viable alternative.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list