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

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


On Fri, 2011-04-01 at 00:46 +0100, Gavin Simpson wrote:
> 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.

OK, the usual constraints on row and column names for matrices and data
frames apply, but other than that, we and R don't give two hoots.

G

> 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