[R-sig-eco] Heat Map for species - code from Numerical Ecology with R‏

Valerie Mucciarelli soccermucc at hotmail.com
Wed Jul 24 00:04:36 CEST 2013


Hello,

I am relatively new to R and I am working through the code that is provided in the book Numerical Ecology with R:http://xa.yimg.com/kq/groups/19243105/1919134110/name/Numerical.pdf (pg 79)

 and I have run across an error message that I can't seem to figure out.

 I am using the vegan, ade4, gclus and cluster packages. The code is as follows:

 # Ordered community table
 # Species are ordered by their weighted averages on site scores

 or <- vegemite(spe, spe.chwo)

 spe is the dataframe, here is part of it:

     AGA   ANT  BON   CAL1   CAL   CER   CRY   DES  EUTH FRY
 1  0.420 0.092 0.051 0.000 0.975 0.000 0.111 0.000 0.127 0
 2  0.000 0.000 0.007 0.002 0.915 0.000 0.000 0.000 0.151 0
 4  0.000 0.008 0.000 0.009 0.124 0.003 0.000 0.000 0.095 0
 7  0.000 0.002 0.003 0.002 0.121 0.002 0.000 3.573 0.180 0
 12 0.000 0.020 0.000 0.002 0.444 0.001 0.000 0.000 0.242 0
 13 8.727 0.000 0.000 0.000 0.743 0.000 0.000 0.000 0.050 0
 14 2.163 0.009 0.000 0.003 1.121 0.000 0.000 0.000 0.051 0
 15 0.000 0.004 0.000 0.000 0.109 0.000 0.000 0.000 0.007 0
 18 9.021 0.018 0.002 0.000 0.286 0.000 0.000 0.000 0.028 0
 19 0.000 0.038 0.000 0.019 0.509 0.000 0.000 0.000 0.155 0

 spe.chwo came from:

 spe.norm <- decostand(spe, "normalize")
 spe.ch <- vegdist(spe.norm, "euc")
 spe.ch.UPGMA <- hclust(spe.ch, method = "average")
 spe.chwo <- reorder.hclust(spe.ch.UPGMA, spe.ch)


 and the error is:

 Error in vegemite(spe, spe.chwo) :
 Cowardly refusing to use longer than 1 char symbols:
 Use scale

 The data in the dataframe is biomass data recorded to 4 digits. I'm wondering if this code is not working because my data is more than one digit long.

 Any suggestions or insight on how to get this code to work would be greatly appreciated.

 Thank you,

 Val 		 	   		  


More information about the R-sig-ecology mailing list