[R] tackle memory insufficiency for large dataset using save() & load()?

Gabor Grothendieck ggrothendieck at gmail.com
Wed Aug 22 04:52:31 CEST 2007


?save says its the names (not the objects) although I just
tried it and both save(iris, file = "/iris.Rdata") and
save("iris", file = "/iris.Rdata") seemed to work so you are
right that it seems to work with the objects, not just the names,\
although its not documented to do so.

Usage
save(..., list = character(0),
     file = stop("'file' must be specified"),
     ascii = FALSE, version = NULL, envir = parent.frame(),
     compress = !ascii, eval.promises = TRUE)

save.image(file = ".RData", version = NULL, ascii = FALSE,
           compress = !ascii, safe = TRUE)

Arguments
... the names of the objects to be saved.
list A character vector containing the names of objects to be saved.

On 8/21/07, Rolf Turner <r.turner at auckland.ac.nz> wrote:
>
> On 22/08/2007, at 1:48 PM, Gabor Grothendieck wrote:
>
> > See ?save .  The ... arguments are the ***names*** of the objects, not
> > the objects
> > so you want save("d", ...whatever...) not save(d, ...whatever...) .
>
>        I think this is wrong.  You want the objects not their names.
>
>        If you want to make use of object names, use the list argument.
>
>        I.e.
>
>                save(melvin,clyde,file="irving")
>
>        and
>
>                save(list=c("melvin","clyde"),file="irving")
>
>        accomplish the same thing.
>
>                                cheers,
>
>                                        Rolf Turner
>
> ######################################################################
> Attention:
> This e-mail message is privileged and confidential. If you are not the
> intended recipient please delete the message and notify the sender.
> Any views or opinions presented are solely those of the author.
>
> This e-mail has been scanned and cleared by MailMarshal
> www.marshalsoftware.com
> ######################################################################
>



More information about the R-help mailing list