combine: Combine multiple objects

combineR Documentation

Combine multiple objects

Description

Combine multiple objects

Usage

combine(x, y, ...)

## S4 method for signature 'SingleCellExperiment,SingleCellExperiment'
combine(x, y)

Arguments

x

Object.

y

Object.

...

Additional arguments.

Details

We're attempting to make this as strict as possible, requiring:

  • Rows (genes) across objects must be identical.

  • rowRanges and/or rowData metadata must be identical.

  • colData must contain the same columns.

  • Specific metadata must be identical (see metadata argument).

Value

SingleCellExperiment.

Note

Updated 2022-03-21.

See Also

  • help("merge.Matrix", "Matrix.utils").

Examples

data(SingleCellExperiment_splatter, package = "AcidTest")

## SingleCellExperiment ====
x <- SingleCellExperiment_splatter
colnames(x) <- paste0(
    "cell",
    AcidBase::strPad(
        x = as.character(seq_len(ncol(x))),
        width = 4L,
        side = "left",
        pad = "0"
    )
)
y <- x
colnames(y) <- paste0(
    "cell",
    AcidBase::strPad(
        x = as.character(seq_len(ncol(y)) + ncol(y)),
        width = 4L,
        side = "left",
        pad = "0"
    )
)
## Combine the two objects.
c <- combine(x, y)
sampleData(c)
print(c)

acidgenomics/r-acidsinglecell documentation built on March 30, 2024, 5:39 a.m.