File: read.systat.Rd

package info (click to toggle)
foreign 0.8.17-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,440 kB
  • ctags: 675
  • sloc: ansic: 7,003; sh: 24; makefile: 6; asm: 4
file content (57 lines) | stat: -rw-r--r-- 1,948 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
\name{read.systat}
\alias{read.systat}
\title{Obtain a Data Frame from a Systat File}
\description{
  \code{read.systat} reads a rectangular data file stored by the Systat
  \code{SAVE} command as (legacy) \code{*.sys} or more recently
  \code{*.syd} files.
}
\usage{
read.systat(file, to.data.frame = TRUE)
}
\arguments{
  \item{file}{character variable with the name of the file to read}
  \item{to.data.frame}{return a data frame (otherwise a list)}
}
\details{
  The function only reads those Systat files that are rectangular data
  files (\code{mtype = 1}), 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.

  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} is \code{FALSE},
  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.

  If there is a user comment in the header this is returned as attribute
  \code{"comment"}.  Such comments are always a multiple of 72
  characters (with a maximum of 720 chars returned), normally padded with
  trailing spaces.
}

\value{
  A data frame (or list) with one component for each variable in the
  saved data set.
}

\references{
  Systat Manual, 1987, 1989\cr
 
  Bivand, R. S. (1992)
  SYSTAT-compatible software for modelling spatial dependence among
  observations. \emph{Computers and Geosciences} \bold{18}, 951--963.
}
\author{Roger Bivand}

\examples{
summary(iris)
iris.s <- read.systat(system.file("files/Iris.syd", package="foreign")[1])
str(iris.s)
summary(iris.s)
}
\keyword{file}