[Phylobase-commits] r437 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 26 19:28:17 CEST 2009


Author: pdc
Date: 2009-04-26 19:28:17 +0200 (Sun, 26 Apr 2009)
New Revision: 437

Modified:
   pkg/R/methods-phylo4d.R
Log:
redundant to have a reorder method for phylo4d.   Calls to reorder("phylo4d") will dispatch reorder("phylo4"), which is the same

Modified: pkg/R/methods-phylo4d.R
===================================================================
--- pkg/R/methods-phylo4d.R	2009-04-26 17:26:22 UTC (rev 436)
+++ pkg/R/methods-phylo4d.R	2009-04-26 17:28:17 UTC (rev 437)
@@ -179,21 +179,6 @@
     return(rev(temp))
 })
 
-setMethod("reorder", signature(x = 'phylo4d'),
-          function(x, order = c('preorder','postorder')) {
-    ## call orderIndex and use that index to order edges, labels and lengths
-    order       <- match.arg(order)
-    index       <- orderIndex(x, order)
-    x at order     <- order
-    x at edge      <- x at edge[index, ]
-    ## don't reorder data!
-    ## x at tip.data  <- x at tip.data[index[index <= nTips(x)], , drop = FALSE]
-    ## x at node.data <- x at node.data[index[index > nTips(x)], , drop = FALSE]
-    if(hasEdgeLabels(x)) { x at edge.label  <- x at edge.label[index] }
-    if(hasEdgeLength(x)) { x at edge.length <- x at edge.length[index] }
-    x
-})
-
 setMethod("head",signature(x = 'phylo4d'),
           function(x,n=20) {
             head(as(x,"data.frame"),n=n)



More information about the Phylobase-commits mailing list