EVOLUTION-MANAGER
Edit File: read.systat.html
<!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: Obtain a Data Frame from a Systat File</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for read.systat {foreign}"><tr><td>read.systat {foreign}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Obtain a Data Frame from a Systat File</h2> <h3>Description</h3> <p><code>read.systat</code> reads a rectangular data file stored by the Systat <code>SAVE</code> command as (legacy) <code>*.sys</code> or more recently <code>*.syd</code> files. </p> <h3>Usage</h3> <pre> read.systat(file, to.data.frame = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>file</code></td> <td> <p>character variable with the name of the file to read</p> </td></tr> <tr valign="top"><td><code>to.data.frame</code></td> <td> <p>return a data frame (otherwise a list)</p> </td></tr> </table> <h3>Details</h3> <p>The function only reads those Systat files that are rectangular data files (<code>mtype = 1</code>), and warns when files have non-standard variable name codings. The files tested were produced on MS-DOS and Windows: files for the Mac version of Systat have a completely different format. </p> <p>The C code was originally written for an add-on module for Systat described in Bivand (1992 paper). Variable names retain the trailing dollar in the list returned when <code>to.data.frame</code> is <code>FALSE</code>, and in that case character variables are returned as is and filled up to 12 characters with blanks on the right. The original function was limited to reading Systat files with up to 256 variables (a Systat limitation); it will now read up to 8192 variables. </p> <p>If there is a user comment in the header this is returned as attribute <code>"comment"</code>. Such comments are always a multiple of 72 characters (with a maximum of 720 chars returned), normally padded with trailing spaces. </p> <h3>Value</h3> <p>A data frame (or list) with one component for each variable in the saved data set. </p> <h3>Author(s)</h3> <p>Roger Bivand</p> <h3>References</h3> <p>Systat Manual, 1987, 1989<br /> </p> <p>Bivand, R. S. (1992) SYSTAT-compatible software for modelling spatial dependence among observations. <em>Computers and Geosciences</em> <b>18</b>, 951–963. </p> <h3>Examples</h3> <pre> summary(iris) iris.s <- read.systat(system.file("files/Iris.syd", package="foreign")[1]) str(iris.s) summary(iris.s) </pre> <hr /><div style="text-align: center;">[Package <em>foreign</em> version 0.8-71 <a href="00Index.html">Index</a>]</div> </body></html>