mp_aggregate-methods: aggregate the assays with the specific group of sample and...

mp_aggregateR Documentation

aggregate the assays with the specific group of sample and fun.

Description

aggregate the assays with the specific group of sample and fun.

Usage

mp_aggregate(.data, .abundance, .group, fun = sum, keep_colData = TRUE, ...)

## S4 method for signature 'MPSE'
mp_aggregate(.data, .abundance, .group, fun = sum, keep_colData = TRUE, ...)

Arguments

.data

MPSE object, required

.abundance

the column names of abundance, default is Abundance.

.group

the column names of sample meta-data, required

fun

a function to compute the summary statistics, default is sum.

keep_colData

logical whether to keep the sample meta-data with .group as row names, default is TRUE.

...

additional parameters, see also aggregate.

Value

a new object with .group as column names in assays

Examples

## Not run: 
data(mouse.time.mpse)
newmpse <- mouse.time.mpse %>%
           mp_aggregate(.group = time)
newmpse

## End(Not run)

xiangpin/MicrobitaProcess documentation built on March 26, 2024, 10:41 p.m.