Learn R Programming

RAM (version 1.2.1.3)

assist.ordination: Perform CCA and RDA Analysis for OTU Tables

Description

This function simplifies CCA and RDA analysis by abstracting away some of the complexity and returning a list of useful measures.

Usage

assist.cca(otu1, otu2 = NULL, meta, full = TRUE, exclude = NULL, rank, na.action=na.exclude) assist.rda(otu1, otu2 = NULL, meta, full = TRUE, exclude = NULL, rank, na.action=na.exclude)

Arguments

otu1
the first OTU table to be used.
otu2
the second OTU table to be used.
meta
the metadata table to be used (must have same samples as otu1/otu2).
full
logical. Should a full model be considered? (If not, a restricted model is used).
exclude
A vector, either numeric or logical, specifying the columns to be removed from meta. If a character vector, columns with those names will be removed; if a numeric vector, columns with those indices will be removed.
rank
a character vector representing a rank. Must be in one of three specific formats (see ?RAM.rank.formatting for help).
na.action
choice of one of the following: "na.fail", "na.omit" or "na.exclude", see na.action in cca for detail.

Value

If both otu1 and otu2 are given, a list of length 2 will be returned with the following items (if only otu1 is given, a list of length 1 will be returned with these items):
$GOF
the goodness of fit scores for the model.
$VIF
the VIF scores for the model.
$percent_variation
the percent variation explained by each axis
$CCA_eig
Eigenvalues for CCA axes.
$CA_eig
Eigenvalues for CA axes.
$anova
the ANOVA results for the model.

See Also

cca, anova.cca

Examples

Run this code
data(ITS1, meta)
cca.help <- assist.cca(ITS1, meta=meta, rank="p")
cca.help$anova

Run the code above in your browser using DataLab