User Tools

Site Tools


Section: Ordination analysis

Ordination diagrams

R functions

From library vegan:

  • plot - if called on the result of ordination (e.g. rda or cca), it draws ordination diagram with setting relevant for given method; high-level plotting function, which can be combined with low-level plotting functions (text, points etc. described below). Draws species and site labels if the number of items displayed is relatively low.
  • ordiplot - an alternative high-level plottig function to plot - draws complete ordination diagrams without labels, which can be added by low-level plotting functions (identify, text and points).
  • biplot - high-level plotting function suitable only for unconstrained and linear ordination methods (PCA and tb-PCA); draws species scores as arrows indicating the direction of increasing species abundance. If used with unimodal methods (like CA) or constrained ordination (RDA, CCA), an error is returned.
  • points - adds points to the ordination diagram (low-level plotting function, adds points to ordination diagram created by ordiplot or plot). Has argument select - logical vector indicating which elements should be displayed (the same for text below).
  • text - similar to points above, adds the text labels for sites/species.
  • orditorp - adds labels onto existing ordination diagram, so as they are readable (they don't overlap). Has arguments priority (which species/sites will be given priority to draw the text instead of only point) and select (logical vector - which species/sites should be drawn).
  • ordilabel - adds the labels which look like stickers; also has priority and select arguments (see orditorp function above).
  • ordipointlabel - creates new ordination diagram and adds both points and labels (for species or sites) in a way to minimize their overlap (uses iteratively optimizing algorithm and can be rather slow). Can be stored in an object further editable interactively by the function orditkplot.
  • orditkplot - produces editable and clickable ordination diagrams, which can be exported, saved into R and also reedited again. Check blogpost of Gavin Simpson to see how to use it.
  • ordispider - creates spiderplot by connecting individual members of the group with the group centroid.
  • ordihull - draws envelope (convexhull) around the group of samples (possibly also color-filled polygon).
  • ordiellipse - similar to envelopes - clouds of points within the group are encircled by ellipse.
  • ordiarrows - draws arrows connecting the groups of samples (visualizing e.g. development of composition in time or in space).
  • scores - function extracting site or species scores from the ordination object. All functions drawing ordination diagrams are using scores extracted by this function. Note that the way how scaling is implemented in vegan package was recently reworked - read the blog post of Gavin Simpson for more details. FIXME

From library vegan3d1):

  • ordirgl - draws 3D ordination diagram, using functionality of library (rgl).
  • orglspider - adds spiders to 3D ordination diagram created by ordirgl.

Custom functions:

  • screestick (Borcard et al. 2018, definition here) - plots the screeplot of eigenvalues and adds broken stick model and Keiser-Guttman criterion to help decide which ordination axes should be selected for interpretation.
  • evplot (Borcard et al. 2011, definition here) - an older function doing the same thing as screestick function above, with differnt plotting strategy.
  • PCAsignificance (library BiodiversityR) - calculates broken-stick model for PCA axes. Function can be
  • ordicenter - adds labels to centroids of groups onto ordination diagrams. Similar to ordispider with argument label = TRUE, but does not draw spider plot. Arguments and use are analogous to ordispider and ordihull. Definition here.
  • orglhull - adds 3D convexhulls wrapping groups of samples (possibly transparent). Custom function not in vegan or vegan3d, requires library (geometry). Definition here.
Note that functions for drawing 3D ordination diagrams have been moved from vegan to a new package vegan3d - the reason according to this message from Jari Oksanen is that these function caused troubles with running or even installing vegan on some platforms, so to separate them was good for stability of vegan.
en/ordiagrams_r.txt · Last modified: 2021/03/03 19:53 by David Zelený

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki