\Header{S3 read functions}{Read an S3 Binary File}
\alias{data.restore}{S3 read functions}
\alias{read.S}{S3 read functions}
\keyword{data}{S3 read functions}
\keyword{file}{S3 read functions}
\begin{Description}\relax
Reads binary data files or \code{data.dump} files that were produced
in S version 3.
\end{Description}
\begin{Usage}
\begin{verbatim}
  data.restore(file, print = FALSE, verbose = FALSE, env = .GlobalEnv)
  read.S(file)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] the filename of the S-PLUS \code{data.dump} or binary
file.
\item[\code{print}] whether to print the name of each object as read from the
file.
\item[\code{verbose}] whether to print the name of every subitem within each
object.
\item[\code{env}] environment within which to create the restored object.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{read.S} can read the binary files produced in most recent
versions of S-PLUS on either Windows (versions 3.x, 4.x, 2000) or Unix
(version 3.x with 4 byte integers). It automatically detects whether
the file was produced on a big- or little-endian machine and adapts
itself accordingly.  \code{data.restore} can read a similar range of
files produced by \code{data.dump}.

Not all S3 objects can be handled in the current version.  The most
frequently encountered exceptions are functions and expressions; you
will also have trouble with objects that contain model formulas.  In 
particular, comments will be lost from function bodies, and the 
argument lists of functions will often be changed.
\end{Details}
\begin{Value}
an R version of the S3 object.
\end{Value}
\begin{Author}\relax
Duncan Murdoch
\end{Author}
\begin{Examples}
\begin{ExampleCode}
## Not run: 
read.S(file.path("_Data", "myobj"))
data.restore("dumpdata", print = TRUE)
## End(Not run)\end{ExampleCode}
\end{Examples}

