relocate-phyloseq: Change column order in the taxonomy table or sample data

relocate-phyloseqR Documentation

Change column order in the taxonomy table or sample data

Description

These functions are wrappers around dplyr::relocate() that provide convenient ways to modify tax_table(x) and sample_data(x).

Usage

relocate_tax_table(x, ...)

## S4 method for signature 'taxonomyTable'
relocate_tax_table(x, ...)

## S4 method for signature 'phyloseq'
relocate_tax_table(x, ...)

relocate_sample_data(x, ...)

## S4 method for signature 'sample_data'
relocate_sample_data(x, ...)

## S4 method for signature 'phyloseq'
relocate_sample_data(x, ...)

Arguments

x

A phyloseq, taxonomyTable, or sample_data object

...

Expressions and arguments passed to dplyr::relocate()

Details

The special column names '.otu' and '.sample' should not be used; see mutate-phyloseq for the ability to change taxa and sample names using these names.

Examples

data(GlobalPatterns)

GlobalPatterns %>% sample_variables
ps <- GlobalPatterns %>%
  relocate_sample_data(SampleType, .after = X.SampleID)
ps %>% sample_variables

mikemc/speedyseq documentation built on April 22, 2024, 6:40 p.m.