Description Usage Arguments Details Value Note Examples
Coerce to SummarizedExperiment
.
1 2 3 4 5 6 7 | as.SummarizedExperiment(x, ...)
## S4 method for signature 'SummarizedExperiment'
as.SummarizedExperiment(x)
## S4 method for signature 'RangedSummarizedExperiment'
as.SummarizedExperiment(x)
|
x |
Object. |
... |
Additional arguments. |
Improved S4 methods for reliably coercing objects that extend
RangedSummarizedExperiment
to a standard SummarizedExperiment
, that
doesn't drop rowData()
.
Related S4 coercion method of interest:
1 2 3 4 5 6 7 8 | getMethod(
f = "coerce",
signature = signature(
from = "RangedSummarizedExperiment",
to = "SummarizedExperiment"
),
where = asNamespace("SummarizedExperiment")
)
|
SummarizedExperiment
.
Updated 2020-01-08.
1 2 3 4 5 6 7 8 9 10 11 | suppressPackageStartupMessages(library(SummarizedExperiment))
data(RangedSummarizedExperiment, package = "acidtest")
## RangedSummarizedExperiment ===
## Current S4 coercion drops row metadata.
names(metadata(rowRanges(RangedSummarizedExperiment)))
se <- as(RangedSummarizedExperiment, "SummarizedExperiment")
names(metadata(rowData(se)))
## Our alternate S3 method preserves the metadata.
se <- as.SummarizedExperiment(RangedSummarizedExperiment)
names(metadata(rowData(se)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.