This function returns the OTUs of the given OTU table(s) which areclassified at the given taxonomic rank.
the first OTU table to be used.
the second OTU table to be used.
a character vector representing a rank. Must be in one of three
specific formats (see
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).
otu2 is given:
rank is given: a list containing two data
frames (otu1 and otu2 selected at the given rank).
rank is not given: a list containing two
lists. The first sublist represents
otu2. The sublists contain seven data
frames, which are the OTU tables selected at each
taxonomic rank (see Examples).
otu2 is not given:
rank is given: a single data frame (otu1
selected at the given rank).
rank is not given: a list containing seven
data frames (otu1 selected at each taxonomic rank).
Wen Chen and Joshua Simpson.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.