[R] ordination in vegan

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Mar 28 13:19:22 CEST 2011


On Sun, 2011-03-27 at 21:40 -0700, Akane Nishimura wrote:
> Hi all,

Hi Akane,

I answered this on the R-forge forum where you first posted it. I have
posted a follow-up there too. More below...

> I have site data with plant species cover and am looking for trends. I'm
> kind of new to this, but have done lots of reading and can't find an answer.
> 
> I tried decorana (I know it's been replaced by ca.) and see a trend, but I'm
> not sure what it means. Is there a way to get the loadings/eigenvectors of
> the axes (like in PCA)? Is there a way to do this with rda() too? How about
> with cca()?  I know I can do scores() or summary() but that's not exactly
> the info I need.  I basically want to interpret the axes.
> 
> Also after doing envfit() and plotting, is there a way to label sites based
> on certain environmental factors?  For instance, I want to highlight plots
> that have a certain treatment (or have different colored points for the
> different treatments.  
> 
> 
> 
> I don't know if it matters but I used downweight() before applying
> decorana().

Here is a copy of the response on the Vegan forum:

There are *two* sets of scores, species and sites (samples). The
terminology in ordination in ecology is a little different to that of
PCA with scores and loadings. Think of the site (sample) scores as the
scores and the species scores as the loadings in a DCA. Also, the
species scores represent the fitted optima of each species in the
ordination space.

If the above doesn't make any sense, consider a good text on ordination
in ecology, such as Legendre and Legendre (1998) Numerical Ecology 2nd
English Edition, or Jongman et al (1995) Data Analysis in Community and
Landscape Ecology.

As for envfit(), like I said, you need to build the plot up by hand.
Here is an example:

data(varespec)
data(varechem)
library(MASS)
ord <- metaMDS(varespec)
fit <- envfit(ord, varechem, perm = 999)
## create two groups to represent two treatments
## you'd use your actual Treatment variable, preferably as a factor
Treatment <- gl(2, NROW(varespec) / 2)

## build up plot
plot(ord, type = "n")
points(ord, display = "species")
## Treatment 1 in blue, Treatment 2 in red
points(ord, display = "sites", col = c("blue","red")[Treatment])
plot(fit, add = TRUE)

Does that help?

As for downweight(), it isn't relevant really - you need to know what it
has done, but that is really just to reduce to weight of rare species in
the data set. For the definition of rare see the help page or the code
for the function - I can't remember what it is off the top of my head.

HTH

G

>  
> 
> down <-downweight(spp2009bttl, fraction = 5)
> 
> down.dca <- decorana(down)
> 
> scores(down.dca)
> 
> summary(down.dca)
> 
> 
> 
> Thanks so much!
> 
>  
> 
> -Akane
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list