get.rank: Get OTUs Classified at Taxonomic Rank(s)

Description Usage Arguments Value Author(s) Examples

View source: R/internal_functions.R View source: R/taxonomy_functions.R

Description

This function returns the OTUs of the given OTU table(s) which areclassified at the given taxonomic rank.

Usage

1
get.rank(otu1, otu2 = NULL, rank = NULL)

Arguments

otu1

the first OTU table to be used.

otu2

the second OTU table to be used.

rank

a character vector representing a rank. Must be in one of three specific formats (see RAM.rank.formatting for help). If omitted, the function will repeat for all seven major taxonomic ranks.

Value

The value returned by this function may become nested lists, so for convenience, any nested lists have been given descriptive items names to make accessing its elements simple (see Examples).

Author(s)

Wen Chen and Joshua Simpson.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    data(ITS1, ITS2)
    # the following are equivalent:
    ITS1.p <- get.rank(ITS1, rank="p")
    # this list has get.rank(ITS1, rank="k"),
    #               get.rank(ITS1, rank="p"), ...
    lst <- get.rank(ITS1)
    stopifnot(identical(ITS1.p, lst$phylum))
    # true
    # get a list of length 2: the item holds all ITS1 data, the
    # second holds ITS2 data
    lst.all <- get.rank(ITS1, ITS2)
    stopifnot(identical(ITS1.p, lst.all$otu1$phylum))

RAM documentation built on May 29, 2017, 3:40 p.m.

Search within the RAM package
Search all R packages, documentation and source code