[Phylobase-commits] r629 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 9 17:29:09 CEST 2009


Author: regetz
Date: 2009-09-09 17:29:09 +0200 (Wed, 09 Sep 2009)
New Revision: 629

Modified:
   pkg/R/treewalk.R
Log:
in getEdge, moved 'match.arg' after 'missing' to avoid spurious warning


Modified: pkg/R/treewalk.R
===================================================================
--- pkg/R/treewalk.R	2009-09-09 05:18:38 UTC (rev 628)
+++ pkg/R/treewalk.R	2009-09-09 15:29:09 UTC (rev 629)
@@ -226,8 +226,6 @@
                     missing=c("warn", "OK", "fail")) {
 
     type <- match.arg(type)
-    missing <- match.arg(missing)
-    output <- match.arg(output)
     res <- character(0)
 
     if(!identical(class(phy), "phylo4")) phy <- as(phy, "phylo4")
@@ -240,6 +238,8 @@
         res <- names(phy at edge.length)
     }
     else {
+        missing <- match.arg(missing)
+        output <- match.arg(output)
         node <- getNode(phy, node, missing)
 
         nd <- lapply(node, function(x) {



More information about the Phylobase-commits mailing list