Rev 7691 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% This file is part of the 'foreign' package for R% It is distributed under the GPL version 2 or later\name{read.xport}\alias{read.xport}\title{Read a SAS XPORT Format Library}\description{Reads a file as a SAS XPORT format library and returns a list ofdata.frames.}\usage{read.xport(file, ...)}\arguments{\item{file}{character variable with the name of the file to read. Thefile must be in SAS XPORT format.}\item{...}{passed to \code{\link{as.data.frame}} when creating the dataframes.}}\value{If there is a more than one dataset in the XPORT format library, a namedlist of data frames, otherwise a data frame. The columns of the dataframes will be either numeric (corresponding to numeric in SAS) orfactor (corresponding to character in SAS). All SAS numeric missingvalues (including special missing values represented by \code{._},\code{.A} to \code{.Z} by SAS) are mapped to \R \code{NA}.Trailing blanks are removed from character columns before conversion toa factor. Some sources claim that character missing values in SAS arerepresented by \code{' '} or \code{''}: these are not treated as \Rmissing values.}\references{SAS Technical Support document TS-140:``The Record Layout of a Data Set in SAS Transport (XPORT) Format''available at\url{https://support.sas.com/content/dam/SAS/support/en/technical-papers/record-layout-of-a-sas-version-5-or-6-data-set-in-sas-transport-xport-format.pdf}}\author{Saikat DebRoy \email{saikat@stat.wisc.edu}}\seealso{\code{\link{lookup.xport}}}\examples{\dontrun{## no XPORT file is installedread.xport("test.xpt")}}\keyword{file}