Skip to content
/ barrel Public

❗ This is a read-only mirror of the CRAN R package repository. barrel — Covariance-Based Ellipses and Annotation Tools for Ordination Plots

License

Notifications You must be signed in to change notification settings

cran/barrel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

barrel: Ordination visualization in R

barrel

A tidy and flexible framework for visualizing multivariate ordinations in R

DOI

CRAN status R-CMD-check


Overview

barrel is an R package that enhances the visualization of ordination analyses (e.g. NMDS, RDA, dbRDA) using ggplot2. It provides a modular set of tools to add ellipses, centroids, environmental vectors, and annotations — all compatible with tidyverse workflows.


Installation

From CRAN:

install.packages("barrel")

Development version from GitHub:

# install.packages("devtools")
devtools::install_github("BarrancoElena/barrel")

Quick example

library(vegan)
library(barrel)
library(ggplot2)

data(dune)
data(dune.env)

ord <- metaMDS(dune)
ord <- barrel_prepare(ord, dune.env)

autoplot(ord, group = "Management", data = dune)

# barrel

Key features

  • autoplot(): single-function plotting of NMDS, RDA, dbRDA, CCA, etc.
  • Support for method = "classic" and "robust" covariance estimation
  • Ellipses (stat_barrel()), centroids (stat_barrel_centroid()), vectors (stat_barrel_arrows())
  • Annotated variance or stress via stat_barrel_annotate()
  • Functions to extract group summaries and environmental fits
  • Customizable with standard ggplot2 syntax

Vignette

A full user guide is available:

browseVignettes("barrel")

Dependencies

Author

Diego Barranco-Elena
@BarrancoElena


License

MIT © 2025 Diego Barranco-Elena

About

❗ This is a read-only mirror of the CRAN R package repository. barrel — Covariance-Based Ellipses and Annotation Tools for Ordination Plots

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages