Learn R Programming

RAM (version 1.2.1.3)

match.data: Match Samples In Ecology Data Sets and Metadata

Description

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.

Usage

match.data(data, is.OTU=TRUE, meta)

Arguments

data
a list of ecology data sets. if is.OTU is TRUE, they should be OTU tables, otherwise should be taxonomy abundance matrices. See also RAM.input.formatting.
is.OTU
logical, whether or not the ecology data sets are OTU tables.
meta
metadata associated with input ecology data sets.

See Also

RAM.input.formatting

Examples

Run this code
## 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)

Run the code above in your browser using DataLab