
Did you mean taxa2dist in package vegan?


library(vegan)
data(dune.taxon)
dune.taxon
# Taxonomic distances from a classification table with variable step lengths.
taxdis <- taxa2dist(dune.taxon, varstep=TRUE)
plot(hclust(taxdis), hang = -1)


Cheers,

Marcelino


At 10:35 24/02/2012, Yong Zhang wrote:
>Dear list,
>
>Actually, I know how to creat the distance(similarity) matrix for 
>quantitive data, and the "package" for doing this is summaried well 
>by Gavin Simpson. As you can find here: 
>http://cran.r-project.org/web/views/Environmetrics.html
>
>Now, what I encount maybe another situation, I have a data set with 
>20 species, and their taxonomic units (Order, Family and Genus).  To 
>describe my question more clearly, the data set is listed as below:
>
>                  G                 F              O
>spe1         G1              F1           O1
>spe2         G1              F1           O1
>spe3         G2              F2           O1
>spe4         G3              F3           O2
>spe5
>.
>.
>.
>.
>spe20      G15             F10           O5
>
>Note: spe1 to spe20 means the 20 species, G, F, and O are the 
>abbreviations for Genus, Family and Order (the 3 different taxonomic 
>units).  From above, you can find that these 20 species belong to 5 
>Order, 10 Family and 15 Genus (i.e., species1 and species2 are 
>classified into the same taxonomic units, however, species2 and 
>species3 are different at the Genus level).
>
>What I'd like to do is creating the similarity (distance) matrix 
>based on the above data set.  I'm wondering if this is possible to 
>deal with this in R, and which package is my correct choice?
>
>Hope I make my point clear, and thanks very much for any hints in advance.
>
>Best regards,
>Yours Yong
>
>
>
>
>ZHANG Yong
>Lab of aquatic insects & stream ecology
>Dept.of Entonology, Nanjing Agricultural University
>Nanjing, 210095,China
>Phone number:  (+86) -25-84395241
>E-mail:2010202035@njau.edu.cn
>
>_______________________________________________
>R-sig-ecology mailing list
>R-sig-ecology@r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

____________________________________

Marcelino de la Cruz Rot
Depto. Biologia Vegetal
EUIT Agricola
Universidad Politecnica de Madrid

tel: 34 + 913365435
____________________________________  
	[[alternative HTML version deleted]]

