en:rlq_examples
Table of Contents
Section: Analysis of species attributes
CWM-RDA and RLQ ordination methods
Example: using RLQ and fourth corner on the aravo dataset (Dray et al.)
The R code for use of rlq
and fourthcorner
functions is in the Supplement of Dray et al. (2014).
Example: using RLQ and fourth corner on the Vltava dataset
load (url ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/vltava.RData')) # fourthcorner analysis spe <- log1p (vltava$herbs$spe) env <- vltava$env[, c(1:4, 11:13)] traits <- vltava$herbs$traits library (ade4) traits.na <- na.omit (traits) traits.na$plant.height <- log10 (traits.na$plant.height) traits.na$seed.weight <- log10 (traits.na$seed.weight) select.species <- rownames (traits) %in% rownames (traits.na) spe.na <- spe[,select.species] fc <- fourthcorner (tabR = env, tabL = spe[,select.species], tabQ = traits[select.species,], p.adjust.method.G = 'none', p.adjust.method.D = 'none') plot (fc, alpha = 0.1, stat = "D2") library (weimea) cwm <- cwm (com = spe, traits = traits) cwm_reg <- test_cwm (cwm = cwm, env = env, test = 'max') fourth <- test_fourth (cwm = cwm, env = env, test = 'max') plot (cwm_reg) plot (fourth) ## RLQ analysis dudiL <- dudi.coa (spe.na, scannf = FALSE) dudiR <- dudi.pca (env, scannf = FALSE, row.w = dudiL$lw) dudiQ <- dudi.pca (traits.na, scannf = FALSE, row.w = dudiL$cw) vlt.rlq <- rlq (dudiR = dudiR, dudiL = dudiL, dudiQ = dudiQ, scannf = FALSE) plot (vlt.rlq)
en/rlq_examples.txt · Last modified: 2021/03/03 19:58 by David Zelený