dump
Produce Text Representations of Objects

Description

Creates an ASCII file representing a group of objects, suitable for editing.

Usage

dump(list, file = "dumpdata.R", append = FALSE, control = "all", 
    envir = parent.frame(), evaluate = TRUE)

Arguments

list a character vector giving the names of data objects.
file a character string specifying the name of a file or a connection into which the objects are dumped. The default is "dumpdata.R", unless list contains only one name, in which case the file is given a name that is based on that name (for example, "x.R"). If a blank is specified (file=""), or if it is NULL, the result is output to the console.
append a logical flag. If TRUE, the output is appended to file. If FALSE (the default), the contents of file is overwritten (if it exists).
control a character vector that specifies the deparsing options. For more detail, refer to .deparseOpts.
envir the environment in which to search for objects.
evaluate This argument is not yet implemented. A logical flag. If TRUE (the default), specifies that promises are evaluated.

Details

If some objects in list do not exist, a warning message is displayed and the nonexistent objects are ignored. If no objects exist, the file specified by file is not created.
Value
returns the invisible character string with the names of the objects that were dumped.
Side Effects
Text (deparsed) representations of the objects given in list are written to the file specified by file.
References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
See Also
dput, restore, source.
Examples
dump(objects(), "all.files") 
unlink("all.files")

x <- 1 y <- 1:10 dump(c("x", "y", "reg.xy"), file="") # x <- # 1 # y <- # 1:10 # Warning message: # In dump(c("x", "y", "reg.xy")) : object 'reg.xy' not found

Package base version 6.1.1-7
Package Index