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

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
3
4
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.

Author(s)

Wen Chen and Joshua Simpson.

See Also

cca, anova.cca

Examples

1
2
3
data(ITS1, meta)
cca.help <- assist.cca(ITS1, meta=meta, rank="p")
cca.help$anova

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-3
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
[1] "A total of  1  columns are removed:  Harvestdate"
[1] "columns in exclude list: "
[1] "column# with missing data: "
[1] "columns# with one level: "
[1] "column# that are not numeric or factor: 6"
Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
3: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
Permutation test for cca under reduced model
Permutation: free
Number of permutations: 999

Model: cca(formula = tax ~ Sample + City + Crop + Plots + Harvestmethod + Ergosterol_ppm + Province + Latitude + Longitude, data = meta.remain, na.action = na.action)
         Df ChiSquare      F Pr(>F)    
Model     9   0.38230 12.149  0.001 ***
Residual  6   0.02098                  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

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