Learn R Programming

ggvegan (version 0.2.1)

fortify.rda: Fortify a "rda" object.

Description

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

Usage

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

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

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 "rda", the result of a call to vegan::rda().

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.

const

NULL; General scaling constant to RDA scores. See vegan::scores.rda() for the details.

...

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

Author

Gavin L. Simpson

Details

TODO

Examples

Run this code

library("vegan")

data(dune)
data(dune.env)

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

Run the code above in your browser using DataLab