Save {Hmisc} | R Documentation |
These functions are slightly enhanced versions of save
and
load
that allow a target directory to be specified using
options(LoadPath="pathname")
. If the LoadPath
option is
not set, the current working directory is used.
# options(LoadPath='mypath') Save(object) Load(object)
object |
the name of an object, usually a data frame. It must not be quoted. |
Save
creates a temporary version of the object under the name
given by the user, so that save
will internalize this name.
Then subsequent Load
or load
will cause an object of the
original name to be created in the global environment. The name of
the R data file is assumed to be the name of the object appended with
".rda"
. For Save
, compression is used.
Frank Harrell
## Not run: d <- data.frame(x=1:3, y=11:13) options(LoadPath='../data/rda') Save(d) # creates ../data/rda/d.rda Load(d) # reads ../data/rda/d.rda ## End(Not run)