autoplot.rda: ggplot-based plot for objects of class "rda"

autoplot.rdaR Documentation

ggplot-based plot for objects of class 'rda'

Description

Produces a multi-layer ggplot object representing the output of objects produced by rda.

Usage

## S3 method for class 'rda'
autoplot(
  object,
  axes = c(1, 2),
  geom = c("point", "text"),
  layers = c("species", "sites", "biplot", "centroids"),
  arrows = TRUE,
  legend.position = "right",
  title = NULL,
  subtitle = NULL,
  caption = NULL,
  ylab,
  xlab,
  const,
  ...
)

Arguments

object

an object of class "rda", the result of a call to rda

axes

numeric; which axes to plot, given as a vector of length 2.

geom

character; which geoms to use for the layers. Can be a vector of up to length 2, in which case, the first element of geom will be used for any site scores (both weighted sum or linear combination scores), and the second element will be used for species scores. The latter will be ignored if arrows = TRUE.

layers

character; which scores to plot as layers

arrows

logical; represent species (variables) using vectors?

legend.position

character or two-element numeric vector; where to position the legend. See theme for details. Use "none" to not draw the legend.

title

character; subtitle for the plot

subtitle

character; subtitle for the plot

caption

character; caption for the plot

ylab

character; label for the y-axis

xlab

character; label for the x-axis

const

General scaling constant to rda scores. See scores.rda for details.

...

Additional arguments passed to fortify.cca.

Details

TODO

Value

Returns a ggplot object.

Author(s)

Gavin L. Simpson

Examples


data(dune)

pca <- rda(dune)
autoplot(pca)

## Just the species scores
autoplot(pca, layers = "species")

gavinsimpson/ggvegan documentation built on July 28, 2023, 9:24 a.m.