set_treatment_levels: set_treatment_levels

View source: R/set_treatment_levels.R

set_treatment_levelsR Documentation

set_treatment_levels

Description

Reorders the levels of a metadata factor column in a phyloseq-class object sample_data.

Usage

set_treatment_levels(phyloseq_obj, treatment, order)

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.

order

The order of factors in treatment column as a vector of strings. If assigned "numeric" will set ascending numerical order.

Value

phyloseq-object

Examples

set_treatment_levels(soil_column, treatment = "Matrix",
order = c("Manure", "Soil", "Effluent"))
set_treatment_levels(soil_column, "Day", "numeric")

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