]> git.donarmstrong.com Git - ape.git/commitdiff
updated reorder.phylo.Rd
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Fri, 7 Sep 2012 14:54:06 +0000 (14:54 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Fri, 7 Sep 2012 14:54:06 +0000 (14:54 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@195 6e262413-ae40-0410-9e79-b911bd7a66b7

man/reorder.phylo.Rd

index dda3b3525c011737ef89473205f17d5a4fb247db..c81beee8a42147fad49ce2b08f0a6703cd49e493 100644 (file)
   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}