[Vegan-commits] r1205 - in pkg/vegan: . inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 31 18:54:24 CEST 2010


Author: jarioksa
Date: 2010-05-31 18:54:24 +0200 (Mon, 31 May 2010)
New Revision: 1205

Modified:
   pkg/vegan/DESCRIPTION
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/treedive.Rd
Log:
document treedist() that has been here since r982 (17 Aug 09)

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2010-05-31 15:12:22 UTC (rev 1204)
+++ pkg/vegan/DESCRIPTION	2010-05-31 16:54:24 UTC (rev 1205)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.18-5
-Date: May 21, 2010
+Version: 1.18-6
+Date: May 31, 2010
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, 
    Helene Wagner  

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-05-31 15:12:22 UTC (rev 1204)
+++ pkg/vegan/inst/ChangeLog	2010-05-31 16:54:24 UTC (rev 1205)
@@ -2,8 +2,13 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 1.18-5 (opened May 21, 2010) 
+Versin 1.18-6 (opened May 31, 2010)
 
+	* treedist: documenting tree dissimilarity function that has been
+	in vegan devel since Aug 17, 2009 (rev928).
+	
+Version 1.18-5 (closed May 31, 2010) 
+
 	* cca, rda: plot() failed if Condition() had factors, but
 	constraints had no factors. An example of failure:
 

Modified: pkg/vegan/man/treedive.Rd
===================================================================
--- pkg/vegan/man/treedive.Rd	2010-05-31 15:12:22 UTC (rev 1204)
+++ pkg/vegan/man/treedive.Rd	2010-05-31 16:54:24 UTC (rev 1205)
@@ -1,7 +1,7 @@
 \name{treedive}
 \alias{treedive}
 \alias{treeheight}
-\alias{treedist}  %% Undocumented!! 
+\alias{treedist}  
 
 \title{ Functional Diversity estimated from a Species Dendrogram}
 \description{
@@ -13,10 +13,11 @@
 \usage{
 treedive(comm, tree, match.force = FALSE)
 treeheight(tree)
+treedist(x, tree)
 }
 
 \arguments{
-  \item{comm}{Community data frame or matrix.}
+  \item{comm, x}{Community data frame or matrix.}
   \item{tree}{A dendrogram which for \code{treedive} must be for species
     (columns).}
   \item{match.force}{Force matching of column names in \code{comm} and
@@ -41,6 +42,16 @@
   reconstructing the dendrogram for the subset of the cophenetic
   distance matrix for species occurring in each site.
 
+  Function \code{treedist} finds the dissimilarities among
+  trees. Pairwise dissimilarity of two trees is found by combining
+  species in a common tree and seeing how much of the tree height is
+  shared and how much is unique. The current function uses a Jaccard
+  like approach and defines dissimilarity as the total unshared height
+  proportional of the total height of the combined tree. The idea is
+  similar as in the UniFrac distance (Lozupone and Knight 2005), but
+  the implementation is completely different and only works in the
+  presence absence framework.
+
   The functions need a dendrogram of species traits as an input. If
   species traits contain \code{\link{factor}} or \code{\link{ordered}}
   factor variables, it is recommended to use Gower distances for mixed
@@ -54,10 +65,17 @@
   Null model, and the results will change with this choice.
 }
 
-\value{
-  A vector of diversity values or a single tree height.
+\value{ 
+  A vector of diversity values or a single tree height, or a
+  dissimilarity structure that inherits from \code{\link{dist}} and
+  can be used similarly.  
 }
+
 \references{
+  Lozupone, C. and Knight, R. 2005. UniFrac: a new phylogenetic method
+  for comparing microbial communities. \emph{Applied and Environmental
+  Microbiology} 71, 8228--8235.
+
   Petchey, O.L. and Gaston, K.J. 2002. Functional diversity (FD), species
   richness and community composition. \emph{Ecology Letters} 5,
   402--411.
@@ -84,6 +102,11 @@
 ## Significance test using Null model communities.
 ## The current choice fixes both species and site totals.
 oecosimu(dune, treedive, "quasiswap", tree = cl)
+## Clustering of tree distances
+dtree <- treedist(dune, cl)
+plot(hclust(dtree, "aver"))
+## Use treedist() in metaMDS() instead of the standard vegdist():
+mod <- metaMDS(dune, distfun = treedist, tree = cl)
 }
 
 \keyword{ univar }



More information about the Vegan-commits mailing list