View source: R/phyloseq_sep_variable.R
phyloseq_sep_variable | R Documentation |
This function splits a phyloseq object by sample meta-data, returning a list of objects whose components each correspond to a group of samples.
phyloseq_sep_variable(physeq, variable, drop_zeroes = T)
physeq |
A phyloseq-class object |
variable |
Variable name (contained in |
drop_zeroes |
Logical, indicating weather OTUs with zero abundance withing a group of samples should be removed |
List with phyloseq objects.
data(GlobalPatterns)
# Split data by sample type (e.g., Soil, Ocean, etc.)
phyloseq_sep_variable(GlobalPatterns, variable = "SampleType")
# Do not remove OTUs with total zero abundance within each sample type
phyloseq_sep_variable(GlobalPatterns, variable = "SampleType", drop_zeroes = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.