conglomerate_samples: Merge samples based on common factor within sample_data.

View source: R/conglomerate_samples.R

conglomerate_samplesR Documentation

Merge samples based on common factor within sample_data.

Description

Inputs a phyloseq object and merges the samples that meet the specified criteria into a single sample. This is meant for replicates, or samples statistically proven to not be significantly different. This should be used with caution as it may be a misleading representation of the data.

Usage

conglomerate_samples(phyloseq_obj, treatment, subset = NULL)

Arguments

phyloseq_obj

A phyloseq-class object. It must contain sample_data()) with information about each sample, and it must contain tax_table()) with information about each taxa/gene.

treatment

Column name as a string or numeric in the sample_data. This can be a vector of multiple columns and they will be combined into a new column.

subset

A factor within the treatment. This will remove any samples that to not contain this factor. This can be a vector of multiple factors to subset on.

Value

phyloseq-object

See Also

merge_samples()

Examples

conglomerate_samples(soil_column, 
treatment = c('Day', 'Matrix', 'Treatment'))

schuyler-smith/phylosmith documentation built on Aug. 17, 2024, 10:19 a.m.