save {base} | R Documentation |
Save R Objects
Description
save
writes a external representation of R objects to the
specified file. The objects can be read back from the file at a later
date by using the function load
.
save.image()
is just a short-cut for “save my current
environment”,
i.e., save(list = ls(all=T), file = ".RData")
. It is what also
happens with q("yes")
.
Usage
save(..., list = character(0), file = "", ascii = FALSE, oldstyle = FALSE)
save.image(file = ".Rdata", oldstyle = FALSE)
Arguments
... |
the names of the objects to be saved. |
list |
A character vector containing the names of objects to be saved. |
file |
the name of the file where the data will be saved. |
ascii |
if |
oldstyle |
logical. Should the old (0.90.1 or earlier) format be used? |
See Also
dput
, dump
, load
.
Examples
x <- runif(20)
y <- list(a = 1, b = TRUE, c = "oops")
save(x, y, file = "xy.Rdata")
save.image()
unlink("xy.Rdata")
unlink(".RData")