Learn R Programming

ggvegan (version 0.2.1)

fortify.cca: Fortify a "cca" object.

Description

Fortifies an object of class "cca" to produce a data frame of the selected axis scores in long format, suitable for plotting with ggplot2::ggplot().

Usage

# S3 method for cca
fortify(model, data, axes = 1:6, layers = c("sp", "wa", "lc", "bp", "cn"), ...)

# S3 method for cca tidy(x, data, axes = 1:6, layers = c("sp", "wa", "lc", "bp", "cn"), ...)

Value

A data frame (tibble) in long format containing the ordination scores. The first two components are score (the type of score in each row) and label (the text label to use on plots for this row). The remaining columns are the extracted ordination axis scores.

Arguments

model, x

an object of class "cca", the result of a call to vegan::cca(), vegan::rda(), or vegan::capscale().

data

currently ignored.

axes

numeric; which axes to extract scores for.

layers

character; the scores to extract in the fortified object. Passed to display in the respective vegan::scores() method.

...

additional arguments passed to vegan::scores.cca().

Author

Gavin L. Simpson

Details

TODO

Examples

Run this code

library("vegan")

data(dune)
data(dune.env)

sol <- cca(dune ~ A1 + Management, data = dune.env)
head(fortify(sol))

Run the code above in your browser using DataLab