1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% saveObject.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{saveObject}
\alias{saveObject.default}
\alias{saveObject}
\title{Saves an object to a file or a connection}
\description{
Saves an object to a file or a connection.
}
\usage{
\method{saveObject}{default}(object, file=NULL, path=NULL, format=c("auto", "xdr", "rds"), compress=TRUE,
..., safe=TRUE)
}
\arguments{
\item{object}{The object to be saved.}
\item{file}{A filename or \code{\link[base:connections]{connection}} where the object should be saved.
If \code{\link[base]{NULL}}, the filename will be the hash code of the object plus ".xdr".}
\item{path}{Optional path, if \code{file} is a filename.}
\item{format}{File format.}
\item{compress}{If \code{\link[base:logical]{TRUE}}, the file is compressed to, otherwise not.}
\item{...}{Other arguments accepted by \code{save()} in the base package.}
\item{safe}{If \code{\link[base:logical]{TRUE}} and \code{file} 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 \code{\link[base:connections]{connection}}.
}
\author{Henrik Bengtsson}
\seealso{
\code{\link{loadObject}}() to load an object from file.
\code{\link[digest]{digest}} for how hash codes are calculated from an object.
See also \code{\link[base]{saveRDS}}().
}
\keyword{programming}
\keyword{IO}
|