[Phylobase-commits] r372 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 20 21:11:11 CET 2008


Author: bbolker
Date: 2008-12-20 21:11:10 +0100 (Sat, 20 Dec 2008)
New Revision: 372

Modified:
   pkg/R/class-phylo4.R
Log:
  fixed Nnode setting bug based on edge matrix with root (na.omit fixes) 



Modified: pkg/R/class-phylo4.R
===================================================================
--- pkg/R/class-phylo4.R	2008-12-20 05:40:23 UTC (rev 371)
+++ pkg/R/class-phylo4.R	2008-12-20 20:11:10 UTC (rev 372)
@@ -51,7 +51,7 @@
     }
 
     ## node.label for internal nodes
-    nnodes <- length(unique(c(edge))) - ntips
+    nnodes <- length(unique(na.omit(c(edge)))) - ntips
     ##    if(is.null(node.label)) {
     ##        node.label <- .genlab("N", nnodes)
     ## } else {



More information about the Phylobase-commits mailing list