dump(list, fileout="dumpdata.q" <<see below>>, full.precision = T, test, oldStyle = T, ...)
"dumpdata.q"
, unless
list
contains only one name, in which case a name based on that name
is used, e.g.
"x.q"
.
list
, with the object
(not its name) as the only argument. For example, supplying
test=is.function
will dump only the function objects among those mentioned in
list
.
get
function. For example,
where="main"
specifies which database to use to get the objects.
F
, then the file will not be readable by versions of S-PLUS earlier than 5.0 (Unix)
or 6.0 (Windows).
fileout
is returned.
list
are written to file fileout.
This function is primarily used for creating text representations of function objects, suitable for
modification using an external editor. Do not use
dump
to transfer
data objects between S-PLUS sessions; use the related function
data.dump
for this purpose.
The files created by
dump
are ASCII text,
and can be shipped to other machines that may have different binary
representations of S-PLUS objects.
The shipped file can then be used to restore the objects,
either with
source
for small files, or with
restore
.
The mode of numeric data may be changed due to a
dump
/
restore
sequence, and the internal structure of a function
object may be changed (with different white space when printing).
The restoration of large data objects that were
created by
dump
may take inordinate amounts of
memory.
source
and
restore
will not be able to properly read an object with a
call
component, such as modeling or trellis
objects (it will try to evaluate the call component). (More generally,
any S-PLUS language object is not suitable
for
dump
since
source
and
restore
evaluates the contents of the dump file.)
The functions
data.dump
and
data.restore
are recommended and have
none of these drawbacks. If the data contain objects of arbitrary classes,
you must use
data.dump
: the parser can't guarantee to reproduce arbitrary
objects exactly.
In general, use
dump
only when it is important that you be able to
read and edit the file. For backing up data or transferring data to
other machines use
data.dump
.
dump(objects(), "all.files") dump(c("x", "y", "reg.xy"))