View source: R/autoplot.barrel_ord.R
| autoplot.barrel_ord | R Documentation |
Generates a ggplot of site scores from a vegan ordination object with optional group ellipses, centroids, and environmental arrows.
This method is designed to work with ordination objects prepared using barrel_prepare.
## S3 method for class 'barrel_ord'
autoplot(object, ...)
object |
An object of class |
... |
Additional arguments:
|
If geom_type = "polygon", group colors are mapped to fill for ellipses. If geom_type = "path", group colors are mapped to color.
The grouping variable must be present in the metadata provided to barrel_prepare.
A ggplot2 object with ordination scores and optional graphical layers.
barrel_prepare, stat_barrel, rda, metaMDS
library(vegan)
data(dune)
data(dune.env)
ord <- rda(dune, scale = TRUE)
ord <- barrel_prepare(ord, dune.env)
ggplot2::autoplot(ord,
group = "Management", data = dune,
method = "robust", kind = "sd", geom_type = "polygon", show_arrows = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.