subOTUset: subOTUset

Description Usage Arguments Value Examples

View source: R/utils-general.R

Description

Function to get a subset of an OTUset object.

Usage

1
subOTUset(object, samples, otus)

Arguments

object

An OTUset object

samples

A list of sample names

otus

A list of OTU names

Value

subOTUset returns an OTUset

Examples

1
2
3
4
5
6
7
8
9
## locate directory with data
dirPath <- system.file("extdata/Sogin_2006", package="OTUbase")

## read in data into OTUset object
soginOTU <- readOTUset(dirPath=dirPath, level="0.03", samplefile="sogin.groups", fastafile="sogin.fasta", otufile="sogin.unique.filter.fn.list", sampleADF="sample_metadata.txt")

## get subset of soginOTU

subOTUset(soginOTU, samples=getSamples(soginOTU, colnum="Site", value="Labrador", exact=FALSE))

OTUbase documentation built on Nov. 8, 2020, 8:24 p.m.