| dump {base} | R Documentation |
This function takes a vector of names of R objects and produces
text representations of the objects on a file or connection.
A dump file can be sourced into another
R (or S) session.
dump(list, file = "dumpdata.R", append = FALSE, envir = parent.frame())
list |
character. The names of one or more R objects to be dumped. |
file |
either a character string naming a file or a
connection. "" indicates output to the console. |
append |
if TRUE, output will be appended to
file; otherwise, it will overwrite the contents of
file. |
envir |
the environment to search for objects. |
At present the implementation of dump is very
incomplete and it really only works for functions and
simple vectors.
dump will warn if fewer characters were written to a file than
expected, which may indicate a full or corrupt file system.
The function save is designed to be used for
transporting R data between machines.
The envir argument was added at version 1.7.0, and changed the
search path for named objects to include the environment from which
dump was called.
As dump is defined in the base namespace, the base
package will be searched before the global environment unless
dump is called from the top level or the envir argument
is given explicitly.
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
x <- 1; y <- 1:10
dump(ls(patt='^[xyz]'), "xyz.Rdmped")
unlink("xyz.Rdmped")