SCE colData {SingleCellExperiment} | R Documentation

## SCE col/rowData methods

### Description

Methods to obtain column- or row-level metadata from the SingleCellExperiment class.

### Usage

    ## S4 method for signature 'SingleCellExperiment'
    colData(x, ..., internal=FALSE)

    ## S4 method for signature 'SingleCellExperiment'
    rowData(x, ..., internal=FALSE)

### Arguments

`x` | A SingleCellExperiment object.
`...` | Further arguments to be passed to the methods for SummarizedExperiment objects, such as `use.names`.
`internal` | Whether the information contained in the internal slots should be returned.

### Details

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.

### Value

`colData` and `rowData` return a `DataFrame` with number of rows equal to `ncol(x)` and `nrow(x)`, respectively.

### See Also

`SingleCellExperiment`

### Examples

    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)

[Package SingleCellExperiment version 1.6.0 Index]