<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Read an S3 Binary or data.dump File</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for S3 read functions"><tr><td>S3 read functions</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Read an S3 Binary or data.dump File</h2>

<h3>Description</h3>

<p>Reads binary data files or <code>data.dump</code> files that were produced
in S version 3.
</p>


<h3>Usage</h3>

<pre>
  data.restore(file, print = FALSE, verbose = FALSE, env = .GlobalEnv)
  read.S(file)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>file</code></td>
<td>
<p>the filename of the S-PLUS <code>data.dump</code> or binary
file.</p>
</td></tr>
<tr valign="top"><td><code>print</code></td>
<td>
<p>whether to print the name of each object as read from the
file.</p>
</td></tr>
<tr valign="top"><td><code>verbose</code></td>
<td>
<p>whether to print the name of every subitem within each
object.</p>
</td></tr>
<tr valign="top"><td><code>env</code></td>
<td>
<p>environment within which to create the restored object(s).</p>
</td></tr>
</table>


<h3>Details</h3>

<p><code>read.S</code> can read the binary files produced in some older
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.
</p>
<p><code>data.restore</code> can read a similar range of files produced by
<code>data.dump</code> and for newer versions of S-PLUS, those from
<code>data.dump(....., oldStyle=TRUE)</code>.
</p>
<p>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.
</p>


<h3>Value</h3>

<p>For <code>read.S</code>, an R version of the S3 object.
</p>
<p>For <code>data.restore</code>, the name of the file.
</p>


<h3>Author(s)</h3>

<p>Duncan Murdoch
</p>


<h3>Examples</h3>

<pre>## if you have an S-PLUS _Data file containing 'myobj'
## Not run: read.S(file.path("_Data", "myobj"))
data.restore("dumpdata", print = TRUE)

## End(Not run)</pre>


</body></html>
