Description Usage Arguments Value Author(s) Examples
This function returns the OTUs of the given OTU table(s) which areclassified at the given taxonomic rank.
1 |
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 |
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).
If otu2
is given:
If rank
is given: a list containing two data
frames (otu1 and otu2 selected at the given rank).
If rank
is not given: a list containing two
lists. The first sublist represents otu1
, the
second otu2
. The sublists contain seven data
frames, which are the OTU tables selected at each
taxonomic rank (see Examples).
If otu2
is not given:
If rank
is given: a single data frame (otu1
selected at the given rank).
If 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))
|
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Warning message:
In get.rank(otu1 = otu1, rank = i) :
no OTUs classified at the species level.
Warning messages:
1: In get.rank(otu1 = otu1, rank = i) :
no OTUs classified at the species level.
2: In get.rank(otu1 = otu1, rank = i) :
no OTUs classified at the species level.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.