[R] How to split data for NMDS plots

Michael Denslow michael.denslow at gmail.com
Mon Apr 5 03:37:50 CEST 2010


Hi Trey,

On Sun, Apr 4, 2010 at 4:28 PM, Trey <trey3_79 at hotmail.com> wrote:
>
> In essence, here is what I'm after:  When I plot the NMDS ordination, I get a
> cloud of points.  To make sense of this cloud I need to differentiate the
> cloud into control and infested sites to see if there is any meaningful
> separation.  The first 5 plots are "infested", and the second 5 plots are
> "control".   So how might I insert code into either the plot or point code
> lines to bring about this differentiation?
> --
> View this message in context: http://n4.nabble.com/How-to-split-data-for-NMDS-plots-tp1751101p1751130.html

When using package vegan ordinations I find it easiest to build the
plot in pieces.
Using points() helps to control the output. Consider the following example:

library(vegan)
?ordiplot
data(dune)
data(dune.env)
mod <- metaMDS(dune)
fig <- plot(mod, type = 'none')
points(fig, 'sites', pch = as.numeric(dune.env$Use))

Hope this helps,
Michael



-- 
Michael Denslow

I.W. Carpenter Jr. Herbarium [BOON]
Department of Biology
Appalachian State University
Boone, North Carolina U.S.A.
-- AND --
Communications Manager
Southeast Regional Network of Expertise and Collections
sernec.org

36.214177, -81.681480 +/- 3103 meters



More information about the R-help mailing list