Description Usage Arguments Author(s) See Also Examples
This function will match samples in ecology data sets, either OTU tables or taxonomy abundance matrices, and those in metadata. It makes sure that datasets contains same samples in the same order.
1 | match.data(data, is.OTU=TRUE, meta)
|
data |
a list of ecology data sets. if |
is.OTU |
logical, whether or not the ecology data sets are OTU tables. |
meta |
metadata associated with input ecology data sets. |
Wen Chen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data(ITS1, ITS2, meta)
meta <- meta[1:8, ]
# use otu tables
matched <- match.data(data=list(otu_ITS1=ITS1, otu_ITS2=ITS2),
is.OTU=TRUE, meta=meta)
# use taxonomy abundance matrices
g1 <- tax.abund(ITS1, rank="g")
g2 <- tax.abund(ITS2, rank="g")
matched <- match.data(data=list(genus_ITS1=g1, genus_ITS2=g2),
is.OTU=FALSE, meta=meta)
# class(matched)
# names(matched)
## End(Not run)
|
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-7
Loading required package: ggplot2
Registered S3 method overwritten by 'ade4':
method from
summary.dist labdsv
[1] "8 samples exist in otus and metadata!"
[1] "8 samples exist in otus and metadata!"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.