combine: Combine multiple objects

combineR Documentation

Combine multiple objects

Description

Combine multiple objects

Usage

combine(x, y, ...)

## S4 method for signature 'SummarizedExperiment,SummarizedExperiment'
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

A single value of the same class as the input values.

Note

Updated 2022-05-23.

See Also

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

Examples

data(RangedSummarizedExperiment, package = "AcidTest")

## SummarizedExperiment ====
x <- RangedSummarizedExperiment
colnames(x) <- paste0(
    "sample",
    sprintf("%02d", seq_len(ncol(x)))
)

y <- x
colnames(y) <- paste0(
    "sample",
    sprintf("%02d", seq(from = ncol(y) + 1L, to = ncol(y) * 2L))
)

## Combine the two objects.
c <- combine(x, y)
sampleData(c)
print(c)

acidgenomics/r-acidexperiment documentation built on Jan. 17, 2024, 7:56 p.m.