year_subset: Subset samples by a specific year

Description Usage Arguments Value Author(s) Examples

Description

Takes the year value in the last two digits of the sample ID and allows selection of a single year of data. Can be performed on tables at higher taxonomic levels generated by combine_otus(), or on tables already subset by bog_subset().

Usage

1
year_subset(year_id, table)

Arguments

table

A table containing the relative abundances of each taxa

year_id

Two digit code indicating the last two digits of the year of interest (05, 07, 08, 09) surrounded by quotes. Regular expressions can be used.

Value

Returns an OTU table containing only samples from the specified year

Author(s)

Alexandra Linz <amlinz16@gmail.com>

Examples

1
2
3
4
5
6
data(otu_table)

seven <- year_subset("07", otu_table)

# Select two years at once
two_years <- year_subset("07|08", otu_table)

OTUtable documentation built on May 1, 2019, 10:51 p.m.