Data Aggregation
Data aggregation summarizes microbiome data at broader taxonomic levels. This reveals intuitive compositional patterns and trends.
1. mStat_aggregate_data()
Function Overview
# Prepare data for the function
data(peerj32.obj)
# Call the function
aggregated_data <- mStat_aggregate_data(
data.obj = peerj32.obj,
subject.var = "subject",
strata.var = NULL
)
feature.tab component of the peerj32.obj dataset before aggregation. This table showcases the microbial feature abundances across multiple samples, illustrating the raw distribution and counts of different microbiome features in the original dataset.
meta.dat component of the peerj32.obj dataset prior to aggregation. This table provides metadata information for each sample, including various attributes and characteristics that offer context and additional information about the samples in the dataset.
feature.tab component after applying the mStat_aggregate_data() function. The table now reflects aggregated microbial feature abundances based on the "subject" variable, summarizing the microbiome features for each unique subject in a consolidated manner.
meta.dat component post-aggregation. The metadata table has been restructured and condensed to correspond with the aggregated samples in feature.tab, offering a streamlined view of sample attributes in the aggregated dataset.Detailed Breakdown
Practical Applications
2. mStat_aggregate_by_taxonomy()
Function Overview
Usage

feature.agg.list created by the mStat_aggregate_by_taxonomy() function, showcasing the aggregation results.Detailed Breakdown
Practical Applications
3. mStat_aggregate_by_taxonomy2()
Function Overview
Usage
Detailed Breakdown
Practical Applications
Last updated