Learn R Programming

douconca

R library douconca analyzes multi-trait multi-environment ecological data by double constrained correspondence analysis (ter Braak & van Rossum, 2025) using vegan and native R code. It has a formula interface for the trait- (column-) and environment- (row-) models, which allows to assess, for example, the importance of trait interactions in shaping ecological communities. Throughout the two step algorithm of ter Braak et al. (2018) is used. This algorithm combines and extends community- (sample-) and species-level analyses, i.e. the usual community weighted means (CWM)-based regression analysis and the species-level analysis of species-niche centroids (SNC)-based regression analysis. The CWM regressions are specified with an environmental formula and the SNC regressions are specified with a trait formula. dcCA finds the environmental and trait gradients that optimize these regressions. The first step uses cca (Oksanen et al. 2022) to regress the transposed abundance data on to the traits and (weighted) redundancy analysis to regress the community-weighted means (CWMs) of the orthonormalized traits, obtained from the first step, on to the environmental predictors. The sample total of the abundance data are used as weights. The redundancy analysis is carried out using rda if sites have equal weights (after division of the rows by their total) or, in the general weighted case, using wrda. Division by the sample total has the advantage that the multivariate analysis corresponds with an unweighted (multi-trait) community-level analysis, instead of being weighted, which may give a puzzling difference between common univariate and this multivariate analysis.

References: ter Braak, CJF, Šmilauer P, and Dray S. 2018. Algorithms and biplots for double constrained correspondence analysis. Environmental and Ecological Statistics, 25(2), 171-197. https://doi.org/10.1007/s10651-017-0395-x

ter Braak, C.J.F. and van Rossum, B. (2025). Linking Multivariate Trait Variation to the Environment: Advantages of Double Constrained Correspondence Analysis with the R Package Douconca. Ecological Informatics, 88. https://doi.org/10.1016/j.ecoinf.2025.103143 ## Installation

You can install the CRAN version of douconca by:

install.packages("douconca")

You can install the development version of douconca by:

install.packages("remotes")
remotes::install_github("Biometris/douconca", ref = "develop", dependencies = TRUE)

Copy Link

Version

Install

install.packages('douconca')

Monthly Downloads

203

Version

1.2.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Bart-Jan van Rossum

Last Published

May 9th, 2025

Functions in douconca (1.2.3)

FS

Default forward selection function.
anova.dcca

Community- and Species-Level Permutation Test in Double Constrained Correspondence Analysis (dc-CA)
anova_species

Utility function: Species-level Permutation Test in Double Constrained Correspondence Analysis (dc-CA)
FS.dcca

Forward selection of traits or environmental variables using dc-CA.
cca0

Performs a canonical correspondence analysis
FS.wrda

Forward selection of predictor variables using wrda or cca0
coef.dcca

Coefficients of double-constrained correspondence analysis (dc-CA)
fN2

Hill number of order 2: N2
plot.dcca

Plot a single dc-CA axis with CWMs, SNCs, trait and environment scores.
getPlotdata

Utility function: extracting data from a dc_CA object for plotting a single axis by your own code or plot.dcca.
fitted.dcca

Fitted values of double-constrained correspondence analysis (dc-CA)
plot_dcCA_CWM_SNC

Plot the CWMs and SNCs of a single dc-CA axis.
dc_CA

Performs (weighted) double constrained correspondence analysis (dc-CA)
douconca-package

The package douconca performs double constrained correspondence analysis for trait-environment analysis in ecology
ipf2N2

Iterative proportional fitting of an abundance table to Hill-N2 marginals
dune_trait_env

Dune meadow data with plant species traits and environmental variables
fCWM_SNC

Calculate community weighted means and species niche centroids for double constrained correspondence analysis
plot_species_scores_bk

Vertical ggplot2 line plot of ordination scores
predict.wrda

Prediction from cca0 and wrda models
wrda

Performs a weighted redundancy analysis
reexports

Objects exported from other packages
predict.dcca

Prediction for double-constrained correspondence analysis (dc-CA)
scores.dcca

Extract results of a double constrained correspondence analysis (dc-CA)
print.wrda

Print a summary of a wrda or cca0 object
scores.wrda

Extract results of a weighted redundancy analysis (wrda) or a cca0 object.
print.dcca

Print a summary of a dc-CA object.
anova.cca0

Permutation Test for canonical correspondence analysis
anova_sites

Utility function: community-level permutation test in Double Constrained Correspondence Analysis (dc-CA)
anova.wrda

Permutation Test for weighted redundancy analysis