From 22bfb51d0260544b61b4bdfbd8e039d52b540617 Mon Sep 17 00:00:00 2001 From: paradis Date: Fri, 7 Sep 2012 14:54:06 +0000 Subject: [PATCH] updated reorder.phylo.Rd git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@195 6e262413-ae40-0410-9e79-b911bd7a66b7 --- man/reorder.phylo.Rd | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/man/reorder.phylo.Rd b/man/reorder.phylo.Rd index dda3b35..c81beee 100644 --- a/man/reorder.phylo.Rd +++ b/man/reorder.phylo.Rd @@ -22,16 +22,28 @@ Because in a tree coded as an object of class \code{"phylo"} each branch is represented by a row in the element `edge', there is an arbitrary choice for the ordering of these rows. \code{reorder} allows - to reorder these rows according to two rules: in the + to reorder these rows according to three rules: in the \code{"cladewise"} order each clade is formed by a series of - contiguous rows; this is the order returned by - \code{\link{read.tree}}. In the \code{"pruningwise"} order, rows are - arranged so that ``pruning'' the tree (or post-order tree traversal) - can be done by descending along the rows of `edge'. The possible - multichotomies and branch lengths are preserved. + contiguous rows. In the \code{"postorder"} order, the rows are + arranged so that computations following pruning-like algorithm the + tree (or postorder tree traversal) can be done by descending along + these rows (conversely, a preorder tree traversal can be performed by + moving from the last to the first row). The \code{"pruningwise"} order + is an alternative ``pruning'' order which is actually a bottom-up + traversal order (Valiente 2002). (This third choice might be removed + in the future as it merely duplicates the second one which is more + efficient.) The possible multichotomies and branch lengths are preserved. + + Note that for a given order, there are several possible orderings of + the rows of `edge'. } \value{ - an object of class \code{"phylo"}, or a numeric vector if \code{index.only = TRUE}. + an object of class \code{"phylo"} (with the attribute \code{"order"} + set accordingly), or a numeric vector if \code{index.only = TRUE}. +} +\references{ + Valiente, G. (2002) \emph{Algorithms on Trees and Graphs.} New York: + Springer. } \author{Emmanuel Paradis} \seealso{ @@ -40,9 +52,8 @@ } \examples{ data(bird.families) -tr <- reorder(bird.families, "p") +tr <- reorder(bird.families, "postorder") all.equal(bird.families, tr) # uses all.equal.phylo actually all.equal.list(bird.families, tr) # bypasses the generic } - \keyword{manip} -- 2.39.2