User Tools

Site Tools


en:rda_cca_rscript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
en:rda_cca_rscript [2019/02/10 01:17]
David Zelený created
en:rda_cca_rscript [2019/02/10 01:32]
David Zelený
Line 1: Line 1:
 <code rsplus> <code rsplus>
 +# CCA - scaling 1 vs scaling 2
 +
 +library (vegan)
 +data (dune)
 CA <- cca (dune) CA <- cca (dune)
 png ('​CA-scaling1-2.png',​ width = 8, height = 4, units = '​in',​ res = 300) png ('​CA-scaling1-2.png',​ width = 8, height = 4, units = '​in',​ res = 300)
Line 5: Line 9:
 plot (CA, scaling = 1, main = 'CA on dune data, Scaling 1') plot (CA, scaling = 1, main = 'CA on dune data, Scaling 1')
 plot (CA, scaling = 2, main = 'CA on dune data, Scaling 2') 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 () dev.off ()
 </​code>​ </​code>​
en/rda_cca_rscript.txt · Last modified: 2019/02/10 01:34 by David Zelený