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

Description Usage Arguments Author(s) See Also Examples

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

1

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.

Author(s)

Wen Chen

See Also

RAM.input.formatting

Examples

 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)

Example output

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!"

RAM documentation built on May 2, 2019, 3:04 p.m.