\HeaderA{read.AnnotatedDataFrame}{Read 'AnnotatedDataFrame'}{read.AnnotatedDataFrame}
\keyword{file}{read.AnnotatedDataFrame}
\keyword{manip}{read.AnnotatedDataFrame}
\begin{Description}\relax
Create an instance of class AnnotatedDataFrame by reading a file.
\end{Description}
\begin{Usage}
\begin{verbatim}
read.AnnotatedDataFrame(filename, path,
     sep = "\t", header = TRUE, quote = "", stringsAsFactors = FALSE, 
     row.names = 1L,
     varMetadata.char="#",
     widget = getOption("BioC")$Base$use.widgets,
     sampleNames = character(0), ...) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{filename}] file or connection from which to read.
\item[\code{path}] (optional) directory in which to find \code{filename}.
\item[\code{row.names}] this argument gets passed on to
\code{\LinkA{read.table}{read.table}} and will be used for the row names of the
phenoData slot.
\item[\code{varMetadata.char}] lines beginning with this character are used
for the \code{varMetadata} slot. See examples.
\item[\code{sep, header, quote, stringsAsFactors, ...}] further arguments that get passed on to
\code{\LinkA{read.table}{read.table}}.
\item[\code{widget}] logical. Currently this is \emph{not} implemented, and
setting this option to \code{TRUE} will result in an error. In a
precursor of this function, \code{read.phenoData}, this option could
be used to open an interactive GUI widget for entering the data.
\item[\code{sampleNames}] optional argument that could be used in conjunction
with \code{widget}; do not use.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function \code{\LinkA{read.table}{read.table}} is used to read
\code{pData}. The argument \code{varMetadata.char} is passed on to
that function as its argument \code{comment.char}.
Lines beginning with  \code{varMetadata.char} are expected to contain
further information on the column headers of \code{pData}.
The format is of the form: \code{\# variable: textual explanation of the
    variable, units, measurement method, etc.} (assuming that \code{\#}
is the value of \code{varMetadata.char}). See also examples.
\end{Details}
\begin{Value}
An instance of class \code{AnnotatedDataFrame}
\end{Value}
\begin{Author}\relax
Martin Morgan <mtmorgan@fhcrc.org> and Wolfgang Huber,
based on \code{read.phenoData} by Rafael A. Irizarry.
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{AnnotatedDataFrame}{AnnotatedDataFrame}} for additional methods,
\code{\LinkA{read.table}{read.table}} for details of reading in phenotypic data
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

exampleFile = system.file("extdata", "pData.txt", package="Biobase")

adf <- read.AnnotatedDataFrame(exampleFile)
adf
head(pData(adf))
head(readLines(exampleFile))

\end{ExampleCode}
\end{Examples}

