[R-sig-eco] get species within sites ordihull polys

Michael Marsh swamp at blarg.net
Sun Sep 27 06:18:24 CEST 2015


Tim, I've used mvpart to cluster, and then rpart.pca the resulting 
regression clustering.
mvpart requires a corresponding environmental data set.
The pca plot has what you require, polygons like ordihull based on and 
showing plots (rows in your data), and vectors to named species.
I have assumed that the distance from the centroid to each species 
corresponds to its importance in configuring the output, but I'm a 
novice andwould like more information on that.
Mike Marsh

On 9/26/2015 3:00 AM, r-sig-ecology-request at r-project.org wrote:
>   get species within sites ordihull polys

Date: Fri, 25 Sep 2015 18:58:19 +0000
From: "Howard, Tim G (DEC)"<tim.howard at dec.ny.gov>
To:"r-sig-ecology at r-project.org"  <r-sig-ecology at r-project.org>
Subject: [R-sig-eco] get species within sites ordihull polys
Message-ID:
	<CY1PR09MB0266DBF8A724047334E58D6CA8420 at CY1PR09MB0266.namprd09.prod.outlook.com>
	
Content-Type: text/plain; charset="us-ascii"

All -
Consider clusters of points in an NMDS with those clusters determined in some way (I'll use hclust below).

Then consider plotting the species on that ordination.  I'd like to automatically find which species are 'most associated' with each cluster. Perhaps that translates to finding those species that fall within an ordihull of each group.  Before I stumble down into the world of the sp package and spatial overlaps perhaps this is already a part of vegan or another package.

###Example:

library(vegan)
data(dune)
ord <- metaMDS(dune)
# get some groups based on hclust
dis <- vegdist(dune)
clus <- hclust(dis, "average")
plot(clus)
rect.hclust(clus, 3)
grp <- cutree(clus, 3)
#plot the mds with the groups
mdsPlot <- plot(ord, type="n", display = "sites")
points(ord, display = "sites", col="red", pch=19)
ordihull(ord, grp)
#plot the species
points(ord, display = "species", col = "blue", pch=19)

###End example

This isn't the best example because species points don't fall in more than one of the black polygons. But, my question: Can I easily identify which blue points (species) fall within the polygon?   Or can I easily identify which species are 'most important' (most abundant?) for defining each of the three groups?

Thanks for any pointers

Tim Howard



More information about the R-sig-ecology mailing list