ausplots_trajectory: Visualisation of species composition and community index...

View source: R/ausplots_trajectory.R

ausplots_trajectoryR Documentation

Visualisation of species composition and community index revisit trajectories


Generates 2D plots visualising the trajectory of species composition (PCoA) and diversity (scatterplot or time series) for revisit series. Trajectories are calculated from the TERN AusPlots point intercept module ($veg.PI) as generated by get_ausplots and other pre-processing functions.


ausplots_trajectory(my.ausplots.object, choices = c("PCoA", "diversity"),
min.revisits = 3, plot_select = NULL, outfile = NULL)



Input raw data object (list) as generated in a call from the get_ausplots function. See Details.


Character. User selection of PCoA and/or diversity plots. Both are generated by default.


Integer. Minimum number of revisits required to include a plot.


Optional character vector of AusPlots plot IDs (site_location_name) to request data for a specific set of plots. Note PCoA will not run on one or very few plots/surveys.


Optional file path and name to which the output pdf file is written.


This function primarily applies the functionality of R package ecotraj (De Cáceres et al. 2019; Sturbois et al. 2021) to the TERN AusPlots vegetation point intercept data by including the required pre-processing of the raw data and modifications to the output plot format. The function is intended as a rapid, visual means to compare revisit trajectories in species composition and diversity (or other community indices) among sites. For in-depth change/trajectory analysis, users are directed to work with the raw data and the extensive functionality in ecotraj or other approaches.

The default graphical outputs require $, to order visits by date, and $veg.PI, for plant species abundance, in the AusPlots data extract. User-generated community indices (any single value per survey/$site_unique) can be plotted in place of diversity if $community.indices appears in the my.ausplots.object. This table must have a $site_unique column matching surveys in $ and any number of additional columns representing any community indices intended for plotting out over time. See Examples.

Two output options are available. 'PCoA' displays the first two axes (and their respective deviance explained as axis labels) of a metric ordination based on species abundances and so shows the trajectory of plots in species composition space. Similar trajectories on the plot implies parallel trends in species presence and abundance.

Next, 'diversity' by default displays a simple scatterplot with trajectories between revisits. The function presently computes species richness and Shannon diversity metrics using the vegan package (Oksanen et al. 2022) and displays these as trajectories on a 2D scatterplot, as well as individually against year. By adding a data table $community.indices to those available via get_ausplots, users can also plot out the trajectory of other bespoke community level indices. For > 2 indices, only individual plots against year of survey are generated.

Note that revisits (and revisit series > 2) are available only for a subset of the full plot network and that ausplots_trajectory may display trajectories better for targeted sets of plots.


Plots are written to a pdf file to ensure consistent formatting, saved by default in the working directory.


Greg Guerin


De Cáceres, M., Coll, L., Legendre, P., Allen, R.B., Wiser, S.K., Fortin, M.J., Condit, R. & Hubbell, S. (2019). Trajectory analysis in community ecology. Ecological Monographs 89: e01350

Oksanen J, Simpson G, Blanchet F, Kindt R, Legendre P, Minchin P, O'Hara R, Solymos P, Stevens M, Szoecs E, Wagner H, Barbour M, Bedward M, Bolker B, Borcard D, Carvalho G, Chirico M, De Caceres M, Durand S, Evangelista H, FitzJohn R, Friendly M, Furneaux B, Hannigan G, Hill M, Lahti L, McGlinn D, Ouellette M, Ribeiro Cunha E, Smith T, Stier A, Ter Braak C, Weedon J (2022). _vegan: Community Ecology Package_. R package version 2.6-4, <>.

Sturbois, A., De Cáceres, M., Sánchez-Pinillos, M., Schaal, G., Gauthier, O., Le Mao, P., Ponsero, A., & Desroy, N. (2021). Extending community trajectory analysis : New metrics and representation. Ecological Modelling 440: 109400

See Also




## Not run: 
#Extract site data first: <- get_ausplots()

#Extract vegetation point intercept data for plots with revisits
#Here, subsetting my.Plots_IDs to revisits in one bioregion <- get_ausplots(veg.PI = TRUE, 
my.Plot_IDs = unique(subset($, visit_number > 1 
& bioregion_name == "MAC", select=site_location_name))[,1])

#Display species composition trajectory for all plots with at least 3 revisits
ausplots_trajectory(, choices = "PCoA")

#Display fractional cover trajectories (community index example)$community.indices <- fractional_cover($veg.PI)[,c("site_unique",
 "bare", "brown", "green")]

ausplots_trajectory(, choices = "diversity")

## End(Not run)

ausplotsR documentation built on Nov. 17, 2023, 9:06 a.m.