year_subset {OTUtable}R Documentation

Subset samples by a specific year

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

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

data(otu_table)

seven <- year_subset("07", otu_table)

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

[Package OTUtable version 1.1.2 Index]