\Header{read.fwf}{Read Fixed Width Format Files}
\keyword{file}{read.fwf}
\begin{Usage}
\begin{verbatim}
read.fwf(file, widths, sep=" ", as.is = FALSE,
         skip = 0, row.names, col.names)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{file}] the name of the file which the data are to be read from.
Each row of the table appears as one line of the file.
\item[\texttt{widths}] integer vector, giving the widths of the fixed-width
fields (of one line).
\item[\texttt{sep}] character; the separator used internally; should be irrelevant.
\item[\texttt{as.is}] see \texttt{\Link{read.table}}.
\item[\texttt{skip}] number of initial lines to skip; see \texttt{\Link{read.table}}.
\item[\texttt{row.names}] see \texttt{\Link{read.table}}.
\item[\texttt{col.names}] see \texttt{\Link{read.table}}.
\end{ldescription}
\end{Arguments}
\begin{Description}
Read a ``table'' of \bold{f}ixed \bold{w}idth \bold{f}ormatted data
into a \texttt{\Link{data.frame}}.\end{Description}
\begin{Value}
A \texttt{\Link{data.frame}} as by \texttt{\Link{read.table}}
which is called internally.\end{Value}
\begin{Note}
This function currently relies on the \texttt{Perl} script
\file{\$RHOME/bin/fwf2table}.
Therefore, it will only work in an environment with
\texttt{Perl} installed.\end{Note}
\begin{Author}
Kurt Hornik \email{hornik@ci.tuwien.ac.at}\end{Author}
\begin{SeeAlso}
\texttt{\Link{scan}} and \texttt{\Link{read.table}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
ff <- tempfile()
cat(file=ff, "123456", "987654", sep="\n")
read.fwf(ff, width=c(1,2,3))	#> 1 23 456 \bsl{} 9 87 654
unlink(ff)
\end{ExampleCode}
\end{Examples}

