.Data
directory that have been previously been
dumped.
restore(file)
file
are placed
in the default working directory (normally .Data).
Usually, the file supplied to
restore
was previously created
(maybe on another machine) by a call to
dump
.
This function is not affected by the current search list.
restore
must be called from the top level and cannot be called
from inside another function.
(The implementation of
restore
uses another invocation of S
to bring in the new objects. Because of this,
restore
contains
a call to
synchronize
, and this call terminates execution of the
expression immediately.)
S-PLUS data can not currently be transferred directly between all machines
since not all machines use the same internal storage method.
Hence when using data created on another machine, it may be necessary to
use
dump
on the original machine and
restore
or
source
on the new machine in order for the data to be readable.
source
can be used to restore dumps also. The differences are that
source
puts the data into the working directory rather than the .Data directory,
and it does not start a new S-PLUS process so it tends to be faster.
The use of
data.dump
and
data.restore
is much more efficient than using
dump
and
restore
.
dump(ls(), file="all.data") restore("all.data")