A 'Tidyverse' Extension for Ordinations and Biplots
Overview
Ordination comprises several multivariate exploratory and explanatory techniques with theoretical foundations in geometric data analysis; see Podani (2000, ISBN:90-5782-067-6) for techniques and applications and Le Roux & Rouanet (2005) doi:10.1007/1-4020-2236-0 for foundations. Greenacre (2010, ISBN:978-84-923846) shows how the most established of these, including principal components analysis, correspondence analysis, multidimensional scaling, factor analysis, and discriminant analysis, rely on eigen-decompositions or singular value decompositions of pre-processed numeric matrix data. These decompositions give rise to a set of shared coordinates along which the row and column elements can be measured. The overlay of their scatterplots on these axes, introduced by Gabriel (1971) doi:10.1093/biomet/58.3.453, is called a biplot. 'ordr' provides inspection, extraction, manipulation, and visualization tools for several popular ordination classes supported by a set of recovery methods. It is inspired by and designed to integrate into 'Tidyverse' workflows provided by Wickham et al (2019) doi:10.21105/joss.01686.
infrastructure and standards
wrapper defaults
Previously, lda_ord() mimicked MASS::lda() in defaulting the retrieval parameters ret.x and ret.grouping to FALSE.
Because they are so important to analysis and especially to biplots, they now default to TRUE.
unit tests
Unit tests have been written for all ggproto shortcuts, though many of these were subsequently migrated to **gggda**.
upgrades to the biplot chassis
axis harmonizers
Multiple harmonizers are now available for scaling secondary axes. That recommended by Gower, Gardner--Lubbe, and Le Roux (2011) is the default, but the user can still specify a numeric scale instead.
GDA-geared coordinate systems
A new 'scaffold' coordinate system fixes the aspect ratio to 1 (required for biplots) and provides user control over the ratio of plotting window dimensions (which defaults to 1, recommended for biplots).
It builds on the 'rect' coordinate system originally developed in **ordr** but migrated to **gggda**.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
scaffold theme
The 'biplot' theme has been renamed 'scaffold', with an alias for backward compatibility.
standardized and restrictive elements parameter (breaking change)
The elements parameter is now standardized across all statistical transformations (through the code generation process) and accepts more restrictive options:
The value is argument-matched to "active", "score", or "structure"; these options may expand as additional supplementary elements are introduced.
Moreover, the former default "all" is no longer accepted, which forecloses the trick of passing the element type to an aesthetic, e.g. size = .element == "active", as had been used in several examples.
up( or down)grades to existing plot layers
Most statistical transformations and geometric constructions have been migrated to **gggda**.
The changes below were made prior to this migration and have the same effects since **gggda** is now an imported dependency.
combined vector and radiating text geom (breaking change)
The 'vector' and 'text_radiate' geoms have been combined.
The shortcut geom_text_radiate() is deprecated, and geom_vector() generates radiating labels by default.
debugged axis geom
The 'axis' and 'isoline' geoms hit trouble when one or more points lay at the origin (x^2 + y^2 == 0). These cases have now been removed in setup_data().
reconciliation of summary functions
The 'center' and 'star' stats now follow the 'summary' stat convention of using fun, so fun.center is deprecated.
Additionally, fun.ord accepts a function that summarizes the columns of a matrix, which accommodates summaries like the depth median that do not decompose along orthogonal axes.
revamped handling of secondary aesthetics (breaking change)
Previously, underscore-separated parameters like label_colour were used to specify secondary aesthetics, i.e. aesthetics for graphical objects other than those considered "primary" for the layer.
Their behavior has been debugged by mimicking the use of period-separated parameters like label.colour in **ggplot2** v3.5.1, except for the new bagplot geom, for which their behavior is based on that of geom_boxplot() in the current development version of **ggplot2**.
This induces some breaking changes due to the renaming of most, and the removal of some, such parameters.
new plot layers (retained in **ordr**)
addition geom
A new 'interpolation' geometric element layer renders either of two methods of vector addition to interpolate the position---on the existing ordination and its biplot---of a new row or column of the original data matrix.
referential stats
A new statistical transformation serves to parent specific "referential stats", meaning those that depend on non-inherited (in this setting, positional) data to transform the inherited data. The reference data are passed to the new referent parameter. The new stat is coupled with an additional LayerRef class that enables ggplot_add() to pass the inherited positional aesthetics to $setup_params(). Biplot-specific stat_*_*() shortcuts accept additional argument types to referent that result in the opposite matrix factor being used as reference data.
projection stat
The 'projection' referential stat prepares segment endpoints between x,y positions and their projections on axes defined by the reference data. It is a natural graphical element for predictive biplots of ordination models of continuous data.
new plot layers (migrated to **gggda**)
rule stat
A new 'rule' statistical transformation computes additional position aesthetics that the 'axis' geom uses to limit and offset axes. The stat is referential and expects a set of functions that compute limits lower and upper along the axes and yintercept and xintercept associated with offset axes. The 'axis' geom preprocesses these aesthetics to rule endpoints xmin,ymin,xmax,ymax and offset vectors xend,yend to force the plotting window to contain the limited axis segments or, if the axes remain lines, the offsets where they are centered.
peel stat
A new 'peel' statistical transformation computes nested convex hulls containing specified fractions of data.
depth stat
A new 'depth' statistical transformation estimates depth across a grid and is paired with GeomContour to produce depth contours, which can be used to plot alpha bags.
adapted density stat & geom
Aided by element standardization, the classic density_2d statistical transformation and geometric construction are adapted to biplots.
Currently, source code generation does not respect fixed parameters passed to layer() by the stat_*() and geom_*() shortcuts; as a consequence, contour = TRUE must be manually passed to geom_*_density_2d().
From NEWS.md in the release
Install
Health
NOTERd contentsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Rd files without \usage: ‘annotation.Rd’ \arguments should not be documented without \usage.
- NOTE11 OK, 2 NOTENow
- NOTE12 OK, 1 NOTE2026-07-11
- OK14 OK2026-04-10
- ERROR13 OK, 1 ERROR2026-04-09
- OK14 OK2026-03-10
Documentation
- Help pages
- 44 (3 internal)includes a package overview page
- Examples that run
- 100%36 run in a plain check
- Exported functions with examples
- 75%
- Documented parameters
- 87%
- Return-value docs
- 79%
- Help pages citing references
- 23%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 23
- Median days to close, 50 most recently updated closed PRs
- 8
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
8 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/corybrunson/ordr on 2026-10-25.
Show all practicesHide 2 practices
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.2.0Latest2025-07-10 · current release · diff ↗ ·
removed 12 exports
GeomAxis, GeomIsoline, GeomLineranges, GeomPointranges, GeomTextRadiate, GeomVector, StatCenter, StatChull, StatCone, StatScale, StatSpantree, StatStaradded 64 exports
CoordScaffold, GeomInterpolation, StatColsBagplot, StatColsDensity2d, StatColsDensity2dFilled, StatColsDepth, StatColsDepthFilled, StatColsPeel, StatColsProjection, StatColsRule, StatProjection, StatRowsBagplot, StatRowsDensity2d, StatRowsDensity2dFilled, StatRowsDepth, StatRowsDepthFilled, StatRowsPeel, StatRowsProjection, StatRowsRule, coord_scaffold, geom_bagplot, geom_cols_bagplot, geom_cols_contour, geom_cols_density_2d, geom_cols_density_2d_filled, geom_cols_interpolation, geom_cols_rule, geom_interpolation, geom_rows_bagplot, geom_rows_contour and 34 more - 0.1.22025-07-02 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.1.12022-10-20 · diff ↗
- 0.1.02022-08-18
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-08-18
- Total releases
- 4 / 4 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.3.0
- Bundled data
- 8.9 KB / 2 files
- Download size
- 642 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ordr")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.