[R-sig-eco] Sites names with spaces in ordiplot

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Apr 1 01:46:05 CEST 2011


On Thu, 2011-03-31 at 14:18 -0600, Manuel Spínola wrote:
> Dear list members,
> 
> I would like to include sites names with blank spaces in an ordiplot for 
> an nmds (in vegan).
> How I do that?

Did you even try it? It works - we and R don't give two hoots what the
labels are, just make sure the row and col names of the dataframe/matrix
are what you want to appear on the plot.

Here is an (not exactly inspiring) example:

require(vegan)
set.seed(1)
dat <- data.frame(matrix(runif(100), ncol = 10))
names(dat) <- paste("Spp", 1:10, sep = "")
rownames(dat) <- paste("Site", 1:10)

head(dat)

mod <- metaMDS(dat)
plot(mod, type = "text")

HTH

G

> Best,
> 
> Manuel
> 
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 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-sig-ecology mailing list