AnnotatedDataFrame

Class Containing Measured Variables and Their Meta-Data Description.

An 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 AnnotatedDataFrame can be accessed with pData and varMetadata.

Keywords
classes
Extends

Versioned

Creating Objects

AnnotatedDataFrame(data, varMetadata, dimLabels=c("rowNames", "columnNames"), ...) AnnotatedDataFrame instances are created using AnnotatedDataFrame. The function can take three arguments, data is a data.frame of the samples (rows) and measured variables (columns). varMetadata is a data.frame with the number of rows equal to the number of columns of the data argument. varMetadata describes aspects of each measured variable. dimLabels provides aesthetic control for labeling rows and columns in the show method. varMetadata and dimLabels can be missing. as(data.frame, "AnnotatedDataFrame") coerces a data.frame to an AnnotatedDataFrame. annotatedDataFrameFrom may be a convenient way to create an AnnotatedDataFrame from AssayData-class.

Slots

Class-specific slots:

data:
A data.frame containing samples (rows) and measured variables (columns).
dimLabels:
A character vector of length 2 that provides labels for the rows and columns in the show method.
varMetadata:
A data.frame with number of rows equal number of columns in data, and at least one column, named labelDescription, containing a textual description of each variable.
.__classVersion__:
A Versions object describing the R and Biobase version numbers used to created the instance. Intended for developer use.

Methods

Class-specific methods.

as(annotatedDataFrame, "data.frame")
Coerce objects of AnnotatedDataFrame to data.frame.
combine(, :
Bind data from one AnnotatedDataFrame to a second AnnotatedDataFrame, returning the result as an AnnotatedDataFrame. Row (sample) names in each argument must be unique. Variable names present in both arguments occupy a single column in the resulting AnnotatedDataFrame. Variable names unique to either argument create columns with values assigned for those samples where the variable is present. varMetadata in the returned AnnotatedDataFrame is updated to reflect the combination.
pData(), pData()<-:
Set and retrieve the data (samples and variables) in the AnnotatedDataFrame
varMetadata(), varMetadata()<-:
Set and retrieve the meta-data (variables and their descriptions) in the AnnotatedDataFrame
featureNames(), featureNames()<-:
Set and retrieve the feature names in AnnotatedDataFrame; a synonym for sampleNames.
sampleNames(), sampleNames()<-:
Set and retrieve the sample names in AnnotatedDataFrame
varLabels(), varLabels()<-:
Set and retrieve the variable labels in the AnnotatedDataFrame
dimLabels(), dimLabels() <-
Retrieve labels used for display of AnnotatedDataFrame, e.g., ‘rowNames’, ‘columnNames’.
Standard generic methods:
initialize():
Object instantiation, used by new; not to be called directly by the user.
as(, "AnnotatedDataFrame"):
Convert a data.frame to an AnnotatedDataFrame.
as(,):
Convert old-style phenoData-class objects to AnnotatedDataFrame, issuing warnings as appropriate.
validObject():
Validity-checking method, ensuring coordination between data and varMetadata elements
updateObject(object, ..., verbose=FALSE)
Update instance to current version, if necessary. See updateObject
isCurrent(object)
Determine whether version of object is current. See isCurrent
isVersioned(object)
Determine whether object contains a 'version' string describing its structure . See isVersioned
show()
Abbreviated display of object
[,:
Subset operation, taking two arguments and indexing the sample and variable. Returns an AnnotatedDataFrame, i.e., including relevant metadata. Unlike a data.frame, setting drop=TRUE generates an error.
[[, $:
Selector returning a variable (column of pData).
[[, ...]]<-, $ <- :
Replace or add a variable to pData. ... can include named arguments (especially labelDescription) to be added to varMetadata.
dim(), ncol():
Number of samples and variables (dim) and variables (ncol) in the argument.
dimnames(), rownames(), colnames():
row and column names.

See Also

eSet, ExpressionSet, read.AnnotatedDataFrame

Aliases
  • class:AnnotatedDataFrame
  • AnnotatedDataFrame
  • AnnotatedDataFrame-class
  • AnnotatedDataFrame,missing,missing-method
  • AnnotatedDataFrame,data.frame,missing-method
  • AnnotatedDataFrame,data.frame,data.frame-method
  • dimLabels
  • dimLabels<-
  • [,AnnotatedDataFrame-method
  • [[<-,AnnotatedDataFrame-method
  • [[,AnnotatedDataFrame-method
  • $<-,AnnotatedDataFrame-method
  • $,AnnotatedDataFrame-method
  • coerce,AnnotatedDataFrame,data.frame-method
  • combine,AnnotatedDataFrame,AnnotatedDataFrame-method
  • initialize,AnnotatedDataFrame-method
  • coerce,data.frame,AnnotatedDataFrame-method
  • coerce,phenoData,AnnotatedDataFrame-method
  • dim,AnnotatedDataFrame-method
  • dimnames,AnnotatedDataFrame-method
  • dimnames<-,AnnotatedDataFrame-method
  • dimLabels,AnnotatedDataFrame-method
  • dimLabels<-,AnnotatedDataFrame,character-method
  • ncol,AnnotatedDataFrame-method
  • pData<-,AnnotatedDataFrame,data.frame-method
  • pData,AnnotatedDataFrame-method
  • varMetadata<-,AnnotatedDataFrame,data.frame-method
  • varMetadata,AnnotatedDataFrame-method
  • sampleNames<-,AnnotatedDataFrame,ANY-method
  • sampleNames,AnnotatedDataFrame-method
  • featureNames,AnnotatedDataFrame-method
  • featureNames<-,AnnotatedDataFrame-method
  • show,AnnotatedDataFrame-method
  • updateObject,AnnotatedDataFrame-method
  • varLabels<-,AnnotatedDataFrame-method
  • varLabels,AnnotatedDataFrame-method
Examples
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"))

AnnotatedDataFrame()
AnnotatedDataFrame(data=df)
AnnotatedDataFrame(data=df, varMetadata=metaData)
as(df, "AnnotatedDataFrame")

obj <- AnnotatedDataFrame()
pData(obj) <- df
varMetadata(obj) <- metaData
validObject(obj)
Documentation reproduced from package Biobase, version 2.26.0, License: Artistic-2.0

Community examples

Looks like there are no examples yet.