envtoverlay: Environmental variable fitting to unconstrained ordination...

Description Usage Arguments Value See Also Examples

View source: R/envtoverlay.R

Description

Fits environmental variables as vectors (via envfit) and smooth surfaces (via ordisurf) to an ordination diagram. The figure is faceted if multiple variables are specified.

Usage

1
envtoverlay(PS, covariates, ordmet = "PCA")

Arguments

PS

(required) A phyloseq object.

covariates

(required) A character vector of covariates present in the phyloseq objects sample_data().

ordmet

Ordination method. Options are Principal Component Analysis ("PCA") or Correspondence Analysis ("CA"). Defaults to "PCA".

Value

A ggplot object.

See Also

rda cca envfit ordisurf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(theseus)
library(phyloseq)
library(ggplot2)
data('WWTP_Impact')
cv <- c('log_NO3N', 'log_PO4')
p.eo <- envtoverlay(WWTP_Impact, covariates=cv)
p.eo

## End(Not run)

sw1/theseus documentation built on May 4, 2019, 4:22 p.m.