set_sample_order: Re-orders the samples of a phyloseq object. Function from the...

View source: R/set_sample_order.R

set_sample_orderR Documentation

Re-orders the samples of a phyloseq object. Function from the phylosmith-package.

Description

Inputs a phyloseq-class object and changes the order of sample index either based on the metadata, or a given order. If metadata columns are used, they will take the factor order.

Usage

set_sample_order(phyloseq_obj, treatment)

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, or vector of sample names or indices in particular order.

Value

phyloseq object

Examples

set_sample_order(soil_column, c("Matrix", "Treatment"))

schuyler-smith/phyloschuyler documentation built on Aug. 16, 2024, 5:36 a.m.