| SCE colData {SingleCellExperiment} | R Documentation |
Methods to obtain column- or row-level metadata from the SingleCellExperiment class.
## S4 method for signature 'SingleCellExperiment' colData(x, ..., internal=FALSE) ## S4 method for signature 'SingleCellExperiment' rowData(x, ..., internal=FALSE)
x |
A SingleCellExperiment object. |
... |
Further arguments to be passed to the methods for SummarizedExperiment objects, such as |
internal |
Whether the information contained in the internal slots should be returned. |
It may sometimes be useful to return both the visible and the internal colData in a single DataFrame (see SingleCellExperiment-class).
This can be achieved by using colData(x, internal=TRUE), which will return the stored colData along with the int_colData (currently the sizeFactors).
Similarly, rowData(x, internal=TRUE) will return the stored rowData along with the int_rowData (currently the columns corresponding to isSpike).
Warnings will be raised in the event of any name clashes.
colData and rowData return a DataFrame with number of rows equal to ncol(x) and nrow(x), respectively.
example(SingleCellExperiment, echo=FALSE) # Using the class example sizeFactors(sce) <- runif(ncol(sce)) isSpike(sce, "ERCC") <- rbinom(nrow(sce), 1, 0.2)==1 rowData(sce, internal=TRUE) colData(sce, internal=TRUE)