Skip to content
Prev 4029 / 7420 Next

point color in NMDS (vegan)

Hi Elaine,

Maybe an easier way is to create a factor that will assign the islands 
into groups.
If you want to classify the islands manually, then it might be better 
to use Excel or another tabular processor.
Following your example:

groups<- factor(c('site2', 'site1', 'site1', 'site1', 'site2', 'site2', 
'site3', 'site3', 'site3'))
(supposing the islands are in alphabetical order)

And now one can use the factor as a subscript to pick the right colors:
points(island.NMDS, display = 'species', pch = '+', cex = 0.6, col= 
c('blue','green','red')[groups])

Note that this is a rather basic procedure, which you can learn from 
many documents related to R and easily accessible on the internet, e.g. 
see http://cran.r-project.org/other-docs.html

Cheers,
Vit


Dne 2013-08-19 03:59, Baldwin, Jim -FS napsal: