User Tools

Site Tools


en:rda_cca_rscript

This is an old revision of the document!


# CCA - scaling 1 vs scaling 2
 
library (vegan)
data (dune)
CA <- cca (dune)
png ('CA-scaling1-2.png', width = 8, height = 4, units = 'in', res = 300)
par (mfrow = c(1,2))
plot (CA, scaling = 1, main = 'CA on dune data, Scaling 1')
plot (CA, scaling = 2, main = 'CA on dune data, Scaling 2')
dev.off ()
 
# CCA - LC vs WA scores
 
library (vegan)
library (weimea)
data (dune)
data (dune.env)
data (vltava)
 
png ('CCA-LC-WC-scores.png', width = 8, height = 8, units = 'in', res = 300)
 
par (mfrow = c(2,2))
 
CCA.dune <- cca (dune ~ Management, data = dune.env)
ordiplot (CCA.dune, display = c('sp', 'wa', 'cn'), main = 'CCA on dune: WA scores', xlim = c(-3, 2), ylim = c(-2, 2))
title (main = '(a)', adj = 0)
ordiplot (CCA.dune, display = c('sp', 'lc', 'cn'), main = 'CCA on dune: LC scores', xlim = c(-3, 2), ylim = c(-2, 2))
title (main = '(b)', adj = 0)
 
E32 <- round (vltava$env$COVERE32/10)*10
CCA.vlt <- cca (log1p (vltava$herbs$spe) ~ E32)
 
ordiplot (CCA.vlt, display = c('sp', 'wa', 'bp'), main = 'CCA on vltava: WA scores')
title (main = '(c)', adj = 0)
ordiplot (CCA.vlt, display = c('sp', 'lc', 'cn'), main = 'CCA on vltava: WA scores')
title (main = '(d)', adj = 0)
dev.off ()
en/rda_cca_rscript.1549733546.txt.gz · Last modified: 2019/02/10 01:32 by David Zelený