Learn R Programming

theseus (version 0.1.0)

envtoverlay: Environmental variable fitting to unconstrained ordination diagrams

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

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

Run this code
# 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
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab