Skip to content

labeling loading vectors in vegan

2 messages · Gordon Holtgrieve, Gavin Simpson

3 days later
#
On Fri, 2012-07-27 at 11:52 -0700, Gordon Holtgrieve wrote:
Hi Gordon,

You seem to be trying to fit the species scores as a weighted sum a la
PCA. Usually we add species scores as weighted averages of the site
scores in NMDS. metaMDS() handles the latter for you:

require(vegan)
data(varespec)
data(varechem)

mod <- metaMDS(varespec)
plot(mod)

and you can get the "species" scores directly via:

scrs <- scores(mod, display = "species")
NMDS1       NMDS2
Cal.vul -0.16696628 -0.07418638
Emp.nig  0.05870236  0.10673232
Led.pal  0.88640043 -0.10135959
Vac.myr  0.71139281 -0.10964309
Vac.vit  0.04389918  0.09996126
Pin.syl -0.02588978  0.2963255

There isn't a nice way to fiddle with the plotting of "envfit" objects
that will stop overlap as most of the potential functions don't work
with "envfit" objects.

This would be easier if you worked with the WA species scores as we
could do

plot(mod)
ordipointlabel(mod, display = "species", add = TRUE,
               col = "forestgreen")

where the latter function will do its best to avoid overlap.

Making "envfit" objects work in the same way will require a good amount
of rewriting various functions which is not something I will have time
to do for a few months, but I will add it to the TODO list and discuss
with Jari about how to proceed.

Feel free to contact me off-list if you require further help with this.

All the best,

Gavin