featureGroups {MsFeatures} | R Documentation |
featureGroups
and featureGroups<-
allow to extract or set the feature
definitions from the input object. The implementations for
SummarizedExperiment()
get or set the content of a column named
"feature_group"
in the object's rowData
.
This method should be implemented for all other object for which a
groupFeatures()
method is defined.
featureGroups(object, ...) featureGroups(object) <- value ## S4 method for signature 'SummarizedExperiment' featureGroups(object) ## S4 replacement method for signature 'SummarizedExperiment' featureGroups(object) <- value
object |
the input object. In the |
... |
ignored. |
value |
the new value for the feature groups variable. |
a character
with the group assignment of the features. Has to have
the same length as there are features in object.
Johannes Rainer
## Load the test SummarizedExperiment library(SummarizedExperiment) data(se) ## No column "feature_group" present in the object, this NA is returned featureGroups(se) ## Add a column "feature_group" to the `rowData` of the object rowData(se)$feature_group <- seq_len(nrow(rowData(se))) featureGroups(se)