saveObject
From R.utils v1.4.2
by Henrik Bengtsson
Saves an object to a file or a connection
Saves an object to a file or a connection.
- Keywords
- programming, IO
Usage
## S3 method for class 'default':
saveObject(object, file=NULL, path=NULL, compress=TRUE, ..., safe=TRUE)
Arguments
- object
- The object to be saved.
- file
- A filename or
connection
where the object should be saved. IfNULL
, the filename will be the hash code of the object plus ".xdr". - path
- Optional path, if
file
is a filename. - compress
- If
TRUE
, the file is compressed to, otherwise not. - ...
- Other arguments accepted by
save()
in the base package. - safe
- If
TRUE
andfile
is a file, then, in order to lower the risk for incomplete files, the object is first written to a temporary file, which is then renamed to the final name.
Value
- Returns (invisibly) the pathname or the
connection
.
See Also
loadObject
() to load an object from file.
digest
for how hash codes are calculated from an object.
Community examples
Looks like there are no examples yet.