\HeaderA{AnnotatedDataFrame}{Class Containing Measured Variables and Their Meta-Data Description.}{AnnotatedDataFrame}
\aliasA{\$,AnnotatedDataFrame-method}{AnnotatedDataFrame}{.Rdol.,AnnotatedDataFrame.Rdash.method}
\aliasA{\$<-,AnnotatedDataFrame-method}{AnnotatedDataFrame}{.Rdol.<.Rdash.,AnnotatedDataFrame.Rdash.method}
\aliasA{AnnotatedDataFrame-class}{AnnotatedDataFrame}{AnnotatedDataFrame.Rdash.class}
\aliasA{class:AnnotatedDataFrame}{AnnotatedDataFrame}{class:AnnotatedDataFrame}
\aliasA{coerce,data.frame,AnnotatedDataFrame-method}{AnnotatedDataFrame}{coerce,data.frame,AnnotatedDataFrame.Rdash.method}
\aliasA{coerce,phenoData,AnnotatedDataFrame-method}{AnnotatedDataFrame}{coerce,phenoData,AnnotatedDataFrame.Rdash.method}
\aliasA{combine,AnnotatedDataFrame,AnnotatedDataFrame-method}{AnnotatedDataFrame}{combine,AnnotatedDataFrame,AnnotatedDataFrame.Rdash.method}
\aliasA{dim,AnnotatedDataFrame-method}{AnnotatedDataFrame}{dim,AnnotatedDataFrame.Rdash.method}
\aliasA{dimLabels}{AnnotatedDataFrame}{dimLabels}
\aliasA{dimLabels,AnnotatedDataFrame-method}{AnnotatedDataFrame}{dimLabels,AnnotatedDataFrame.Rdash.method}
\aliasA{dimLabels<\Rdash}{AnnotatedDataFrame}{dimLabels<.Rdash.}
\aliasA{dimLabels<-,AnnotatedDataFrame,character-method}{AnnotatedDataFrame}{dimLabels<.Rdash.,AnnotatedDataFrame,character.Rdash.method}
\aliasA{featureNames,AnnotatedDataFrame-method}{AnnotatedDataFrame}{featureNames,AnnotatedDataFrame.Rdash.method}
\aliasA{featureNames<-,AnnotatedDataFrame-method}{AnnotatedDataFrame}{featureNames<.Rdash.,AnnotatedDataFrame.Rdash.method}
\aliasA{initialize,AnnotatedDataFrame-method}{AnnotatedDataFrame}{initialize,AnnotatedDataFrame.Rdash.method}
\aliasA{ncol,AnnotatedDataFrame-method}{AnnotatedDataFrame}{ncol,AnnotatedDataFrame.Rdash.method}
\aliasA{pData,AnnotatedDataFrame-method}{AnnotatedDataFrame}{pData,AnnotatedDataFrame.Rdash.method}
\aliasA{pData<-,AnnotatedDataFrame,data.frame-method}{AnnotatedDataFrame}{pData<.Rdash.,AnnotatedDataFrame,data.frame.Rdash.method}
\aliasA{sampleNames,AnnotatedDataFrame-method}{AnnotatedDataFrame}{sampleNames,AnnotatedDataFrame.Rdash.method}
\aliasA{sampleNames<-,AnnotatedDataFrame,ANY-method}{AnnotatedDataFrame}{sampleNames<.Rdash.,AnnotatedDataFrame,ANY.Rdash.method}
\aliasA{show,AnnotatedDataFrame-method}{AnnotatedDataFrame}{show,AnnotatedDataFrame.Rdash.method}
\aliasA{updateObject,AnnotatedDataFrame-method}{AnnotatedDataFrame}{updateObject,AnnotatedDataFrame.Rdash.method}
\aliasA{varLabels,AnnotatedDataFrame-method}{AnnotatedDataFrame}{varLabels,AnnotatedDataFrame.Rdash.method}
\aliasA{varLabels<-,AnnotatedDataFrame-method}{AnnotatedDataFrame}{varLabels<.Rdash.,AnnotatedDataFrame.Rdash.method}
\aliasA{varMetadata,AnnotatedDataFrame-method}{AnnotatedDataFrame}{varMetadata,AnnotatedDataFrame.Rdash.method}
\aliasA{varMetadata<-,AnnotatedDataFrame,data.frame-method}{AnnotatedDataFrame}{varMetadata<.Rdash.,AnnotatedDataFrame,data.frame.Rdash.method}
\aliasA{[,AnnotatedDataFrame-method}{AnnotatedDataFrame}{[,AnnotatedDataFrame.Rdash.method}
\aliasA{[[,AnnotatedDataFrame-method}{AnnotatedDataFrame}{[[,AnnotatedDataFrame.Rdash.method}
\aliasA{[[<-,AnnotatedDataFrame-method}{AnnotatedDataFrame}{[[<.Rdash.,AnnotatedDataFrame.Rdash.method}
\keyword{classes}{AnnotatedDataFrame}
\begin{Description}\relax
An \code{AnnotatedDataFrame} consists of two parts. There is a collection
of samples and the values of variables measured on those
samples. There is also a description of each variable measured. The
components of an \code{AnnotatedDataFrame} can be accessed with
\code{\LinkA{pData}{pData}} and \code{\LinkA{varMetadata}{varMetadata}}.
\end{Description}
\begin{Section}{Extends}
Versioned
\end{Section}
\begin{Section}{Creating Objects}
\code{new("AnnotatedDataFrame")}

\code{new("AnnotatedDataFrame", data=data.frame(),
    varMetadata=data.frame(), dimLabels=c("rowNames", "columnNames"))}

\code{AnnotatedDataFrame} instances are created using \code{new}.  The
initialize method takes up to three arguments, \code{data},
\code{varMetadata}, and \code{dimLabels}.  \code{data} is a
\code{data.frame} of the samples (rows) and measured variables
(columns).  \code{varMetadata} is a \code{data.frame} with the number
of rows equal to the number of columns of the \code{data} argument.
\code{varMetadata} describes aspects of each measured
variable. \code{dimLabels} provides aesthetic control for labeling rows
and columns in the \code{show} method. \code{varMetadata} and
\code{dimLabels} can be missing.

\code{as(data.frame, "AnnotatedDataFrame")} coerces a \code{data.frame} to an
\code{AnnotatedDataFrame}.

\code{\LinkA{annotatedDataFrameFrom}{annotatedDataFrameFrom}} may be a convenient way to create
an \code{AnnotatedDataFrame} from \code{\LinkA{AssayData-class}{AssayData.Rdash.class}}.
\end{Section}
\begin{Section}{Slots}
Class-specific slots:
\describe{
\item[\code{data}:] A \code{data.frame} containing samples (rows)
and measured variables (columns).
\item[\code{varMetadata}:] A \code{data.frame} with number of rows
equal number of columns in \code{data}, and at least one column,
named \code{labelDescription}, containing a textual description
of each variable.
}
\end{Section}
\begin{Section}{Methods}
Class-specific methods.
\describe{
\item[\code{combine(<AnnotatedDataFrame>,
        <AnnotatedDataFrame>}:] Bind data from one
\code{AnnotatedDataFrame} to a second
\code{AnnotatedDataFrame}, returning the result as an
\code{AnnotatedDataFrame}. Row (sample) names in each argument
must be unique. Variable names present in both arguments occupy a
single column in the resulting \code{AnnotatedDataFrame}. Variable
names unique to either argument create columns with values
assigned for those samples where the variable is
present. \code{varMetadata} in the returned
\code{AnnotatedDataFrame} is updated to reflect the combination.
\item[\code{pData(<AnnotatedDataFrame>)},
\code{pData(<AnnotatedDataFrame>)<-<data.frame>}:] Set and
retrieve the data (samples and variables) in the
\code{AnnotatedDataFrame}
\item[\code{varMetadata(<AnnotatedDataFrame>)},
\code{varMetadata(<AnnotatedDataFrame>)<-<data.frame>}:] Set and
retrieve the meta-data (variables and their descriptions) in the
\code{AnnotatedDataFrame}
\item[\code{featureNames(<AnnotatedDataFrame>)},
\code{featureNames(<AnnotatedDataFrame>)<-<ANY>}:] Set and
retrieve the feature names in \code{AnnotatedDataFrame}; a
synonym for \code{sampleNames}.
\item[\code{sampleNames(<AnnotatedDataFrame>)},
\code{sampleNames(<AnnotatedDataFrame>)<-<ANY>}:] Set and
retrieve the sample names in \code{AnnotatedDataFrame}
\item[\code{varLabels(<AnnotatedDataFrame>)},
\code{varLabels(<AnnotatedDataFrame>)<-<data.frame>}:] Set and
retrieve the variable labels in the \code{AnnotatedDataFrame}
\item[
\code{dimLabels(<AnnotatedDataFrame>)},
\code{dimLabels(<AnnotatedDataFrame>) <- <character>}] Retrieve
labels used for display of \code{AnnotatedDataFrame}, e.g.,
\sQuote{rowNames}, \sQuote{columnNames}.
}

Standard generic methods:
\describe{
\item[\code{initialize(<AnnotatedDataFrame>)}:] Object instantiation, used
by \code{new}; not to be called directly by the user.
\item[\code{as(<data.frame>, "AnnotatedDataFrame")}:] Convert a
\code{data.frame} to an AnnotatedDataFrame.
\item[\code{as(<phenoData>,<AnnotatedDataFrame>)}:] Convert
old-style \code{phenoData-class} objects to
\code{AnnotatedDataFrame}, issuing warnings as appropriate.
\item[\code{validObject(<AnnotatedDataFrame>)}:] Validity-checking
method, ensuring coordination between \code{data} and
\code{varMetadata} elements
\item[\code{updateObject(object, ..., verbose=FALSE)}] Update instance to current version, if necessary. See \code{\LinkA{updateObject}{updateObject}}
\item[\code{isCurrent(object)}] Determine whether version of object is current. See \code{\LinkA{isCurrent}{isCurrent}}
\item[\code{isVersioned(object)}] Determine whether object contains a 'version' string describing its structure . See \code{\LinkA{isVersioned}{isVersioned}}
\item[\code{show(<AnnotatedDataFrame>)}] Abbreviated display of object
\item[\code{[<sample>,<variable>}:] Subset operation, taking two arguments and
indexing the sample and variable. Returns an
\code{AnnotatedDataFrame}, i.e., including relevant
metadata. Unlike a \code{data.frame}, setting \code{drop=TRUE}
generates an error. 
\item[\code{[[<sample>}, \code{\$<sample>}:] Selector returning a sample and measured
variables.
\item[\code{[[<-<new\_sample>}, \code{\$<-<new\_sample>}:] Replace a sample row of data.
\item[\code{dim(<AnnotatedDataFrame>)},
\code{ncol(<AnnotatedDataFrame>)}:] Number of samples and
variables (\code{dim}) and variables (\code{ncol}) in the
argument.
}
\end{Section}
\begin{Author}\relax
V.J. Carey, after initial design by R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{eSet}{eSet}}, \code{\LinkA{ExpressionSet}{ExpressionSet}},
\code{\LinkA{read.AnnotatedDataFrame}{read.AnnotatedDataFrame}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
df <- data.frame(x=1:6,
                 y=rep(c("Low", "High"),3),
                 z=I(LETTERS[1:6]),
                 row.names=paste("Sample", 1:6, sep="_"))
metaData <-
  data.frame(labelDescription=c(
               "Numbers",
               "Factor levels",
               "Characters"))
                       
new("AnnotatedDataFrame")
new("AnnotatedDataFrame", data=df)
new("AnnotatedDataFrame",
    data=df, varMetadata=metaData)

as(df, "AnnotatedDataFrame")

obj <- new("AnnotatedDataFrame")
pData(obj) <- df
varMetadata(obj) <- metaData
validObject(obj)
\end{ExampleCode}
\end{Examples}

