[Phylobase-commits] r305 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Nov 28 12:50:20 CET 2008


Author: jombart
Date: 2008-11-28 12:50:19 +0100 (Fri, 28 Nov 2008)
New Revision: 305

Modified:
   pkg/R/treewalk.R
Log:
No longer use rootNode in getedges: it fails to return the first node for non-rooted tree.


Modified: pkg/R/treewalk.R
===================================================================
--- pkg/R/treewalk.R	2008-11-26 02:40:07 UTC (rev 304)
+++ pkg/R/treewalk.R	2008-11-28 11:50:19 UTC (rev 305)
@@ -187,7 +187,7 @@
     if (is.character(checkval <- check_phylo4(x))) stop(checkval)
     node <- getnodes(x, node)
     if(any(is.na(node))) stop("wrong node specified")
-    root <- rootNode(x)
+    root <- getnodes(x, nTips(x)+1)
     node[node==root] <- NA
 
     ## main computations



More information about the Phylobase-commits mailing list