\HeaderA{read.xport}{Read a SAS XPORT Format Library}{read.xport}
\keyword{file}{read.xport}
\begin{Description}\relax
Reads a file as a SAS XPORT format library and returns a list of
data.frames.
\end{Description}
\begin{Usage}
\begin{verbatim}
read.xport(file)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] character variable with the name of the file to read.  The
file must be in SAS XPORT format.
\end{ldescription}
\end{Arguments}
\begin{Value}
If there is a more than one dataset in the XPORT format library, a named
list of data frames, otherwise a data frame.  The columns of the data
frames will be either numeric (corresponding to numeric in SAS) or
factor (corresponding to character in SAS).  All SAS numeric missing
values (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 to
a factor.  Some sources claim that character missing values in SAS are
represented by \code{' '} or \code{''}: these are not treated as \R{}
missing values.
\end{Value}
\begin{Author}\relax
Saikat DebRoy \email{saikat@stat.wisc.edu}
\end{Author}
\begin{References}\relax
SAS Technical Support document TS-140:
``The Record Layout of a Data Set in SAS Transport (XPORT) Format''
available at
\url{http://ftp.sas.com/techsup/download/technote/ts140.html}.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{lookup.xport}{lookup.xport}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Not run: 
read.xport("transport")
## End(Not run)
\end{ExampleCode}
\end{Examples}

