relabundance: Getter / setter for relative abundance data

relabundanceR Documentation

Getter / setter for relative abundance data

Description

This function is being deprecated and will be removed in future releases. Please use assay(x, "relabundance") instead, which provides a more flexible and robust way to access and modify relative abundance data stored in the assay slot of a TreeSummarizedExperiment object.

Usage

relabundance(x, ...)

relabundance(x) <- value

## S4 method for signature 'SummarizedExperiment'
relabundance(x)

## S4 replacement method for signature 'SummarizedExperiment'
relabundance(x) <- value

Arguments

x

a TreeSummarizedExperiment object

...

optional arguments not used currently.

value

a matrix to store as the ‘relabundance’ assay

Value

For relabundance, the matrix stored with the name “relabundance”.

Examples

data(GlobalPatterns)
# Calculates relative abundances
GlobalPatterns <- transformAssay(GlobalPatterns, method="relabundance")
# Fetches calculated relative abundances
# head(assay(GlobalPatterns, "relabundance"))

microbiome/mia documentation built on April 27, 2024, 4:04 a.m.