[Adephylo-commits] r36 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Nov 26 15:00:06 CET 2008
Author: jombart
Date: 2008-11-26 15:00:06 +0100 (Wed, 26 Nov 2008)
New Revision: 36
Modified:
pkg/man/distRoot.Rd
Log:
Wrote the doc for distRoot.
Modified: pkg/man/distRoot.Rd
===================================================================
--- pkg/man/distRoot.Rd 2008-11-26 13:48:26 UTC (rev 35)
+++ pkg/man/distRoot.Rd 2008-11-26 14:00:06 UTC (rev 36)
@@ -2,11 +2,11 @@
\alias{distRoot}
\title{Compute the distance of tips to the root}
\description{
- The function \code{distRoot} computes the distance of each tip to the
+ The function \code{distRoot} computes the distance of a set of tips to the
root. Several distances can be used, defaulting to the sum of branch lengths.
}
\usage{
-distRoot(x, method=c("brlength","nAncestors","Abouheif"))
+distRoot(x, tips, method=c("brlength","nNodes","Abouheif","sumDD"))
}
\arguments{
\item{x}{a tree of class \code{\link[pkg:ape]{phylo}},
@@ -15,27 +15,49 @@
ambiguity) specifying the method used to compute distances ;
possible values are:\cr
- \code{brlength}: branch length \cr
- - \code{nAncestors}: number of Ancestors \cr
- - \code{Abouheif}: Abouheif's distance \cr
+ - \code{nNodes}: number of nodes on the path between the nodes \cr
+ - \code{Abouheif}: Abouheif's distance (see details) \cr
+ - \code{sumDD}: sum of direct descendants of all nodes on the path
+ (see details) \cr
}
}
\value{
A numeric vector containing one distance value for each tip.
}
+\details{
+ \code{Abouheif} distance refers to the phylogenetic distance
+ underlying the test of Abouheif (see references). Let P be the set of
+ all the nodes in the path going from \code{node1} to \code{node2}. Let
+ DDP be the number of direct descendants from each node in P. Then, the
+ so-called 'Abouheif' distance is the product of all terms in DDP.\cr
+
+ \code{sumDD} refers to a phylogenetic distance quite similar to that
+ of Abouheif. We consider the same sets P and DDP. But instead of
+ computing the product of all terms in DDP, this distance computes the
+ sum of all terms in DDP.
+}
\author{ Thibaut Jombart \email{jombart at biomserv.univ-lyon1.fr} }
-\seealso{\code{\link{distTips}} which computes several phylogenetic
- distances between tips.
+\references{
+ Pavoine, S.; Ollier, S.; Pontier, D. & Chessel, D. (2008) Testing for
+ phylogenetic signal in life history variable: Abouheif's test
+ revisited. \emph{Theoretical Population Biology}: \bold{73}, 79-91.
}
+\seealso{\code{\link{distTips}} which computes the same phylogenetic
+ distances, but between tips.
+}
\examples{
if(require(ape) & require(phylobase)){
## make a tree
-x <- as(rtree(10),"phylo4")
-D <- distRoot(x)
-D
+x <- as(rtree(50),"phylo4")
+## compute 4 different distances
+met <- c("brlength","nNodes","Abouheif","sumDD")
+D <- lapply(met, function(e) distRoot(x, method=e) )
+names(D) <- met
+D <- as.data.frame(D)
## plot these distances along with the tree
temp <- phylo4d(x, D)
-s.phylo4d(temp, cent=FALSE, scale=FALSE)
+s.phylo4d(temp, show.node=FALSE, cex.lab=.6)
}
}
\keyword{manip}
More information about the Adephylo-commits
mailing list