select-phyloseq: Subset columns in the taxonomy table or sample data using...

select-phyloseqR Documentation

Subset columns in the taxonomy table or sample data using their names and types

Description

These functions are wrappers around dplyr::select() that provide convenient ways to modify tax_table(x) and sample_data(x). See dplyr::select() for supported syntax and helpers.

Usage

select_tax_table(x, ...)

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

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

select_sample_data(x, ...)

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

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

Arguments

x

A phyloseq, taxonomyTable, or sample_data object

...

Expressions passed to dplyr::select()

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 %>% rank_names
GlobalPatterns %>% sample_variables
ps <- GlobalPatterns %>%
  select_tax_table(Phylum, Genus:Species) %>%
  select_sample_data(!dplyr::contains("Barcode"))
ps %>% rank_names
ps %>% sample_variables

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