counts: Counts Accessor and Setter

counts,AnyHermesData-methodR Documentation

Counts Accessor and Setter

Description

[Stable]

These methods access and set the counts assay in a AnyHermesData object.

Usage

## S4 method for signature 'AnyHermesData'
counts(object, ...)

## S4 replacement method for signature 'AnyHermesData,matrix'
counts(object, ..., withDimnames = TRUE) <- value

Arguments

object

(AnyHermesData)
object to access the counts from.

...

not used.

withDimnames

(flag)
setting withDimnames =FALSE in the setter (⁠counts<-⁠) is required when the dimnames on the supplied counts assay are not identical to the dimnames on the AnyHermesData object; it does not influence actual assignment of dimnames to the assay (they're always stored as-is).

value

(matrix)
what should the counts assay be replaced with.

Value

The counts assay.

Methods (by class)

  • counts(object = AnyHermesData) <- value:

Examples

a <- hermes_data
result <- counts(a)
class(result)
head(result)
counts(a) <- counts(a) + 100L
head(counts(a))

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