subset: Subsetting 'AnyHermesData' Objects

subsetR Documentation

Subsetting AnyHermesData Objects

Description

[Stable]

This method subsets AnyHermesData objects, based on expressions involving the rowData columns and the colData columns.

Arguments

x

(AnyHermesData)
object to subset from.

subset

(expression)
logical expression based on the rowData columns to select genes.

select

(expression)
logical expression based on the colData columns to select samples.

Value

The subsetted AnyHermesData object.

Note

Note that this just inherits SummarizedExperiment::subset,SummarizedExperiment-method().

Examples

a <- hermes_data
a

# Subset both genes and samples.
subset(a, subset = low_expression_flag, select = DISCSTUD == "N")

# Subset only genes.
subset(a, subset = chromosome == "2")

# Subset only samples.
subset(a, select = AGE > 18)

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.