[Phylobase-commits] r212 - branches/pdcgsoc/misc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 21 09:29:29 CEST 2008


Author: pdc
Date: 2008-07-21 09:29:29 +0200 (Mon, 21 Jul 2008)
New Revision: 212

Modified:
   branches/pdcgsoc/misc/plot.phylo.R
Log:
these functions no longer needed
they have been turned into the reorder generic

Modified: branches/pdcgsoc/misc/plot.phylo.R
===================================================================
--- branches/pdcgsoc/misc/plot.phylo.R	2008-07-21 07:27:26 UTC (rev 211)
+++ branches/pdcgsoc/misc/plot.phylo.R	2008-07-21 07:29:29 UTC (rev 212)
@@ -10,30 +10,6 @@
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
 
-myorder <- function(edge, tips, root = tips + 1) {
-    ## if(is.null(root)) {
-    ##     root <- tips + 1
-    ## }
-    ## if(root <= tips) {return()}
-    index <- edge[, 1] == root
-    nextr <- edge[index, 2]
-    ## paths <- apply(as.matrix(nextr), 1, reorder, edge = edge, tips = tips)
-    nord <- NULL
-    for(i in nextr) {
-        if(i <= tips) {next()}
-        nord <- c(nord, myorder(edge, tips, root = i))
-    }
-    c(nord, which(index))
-}
-
-reorder.phylo4 <- function(phy) {
-    index <- myorder(phy at edge, length(phy at tip.label))
-    phy at edge        <- phy at edge[index, ]
-    phy at edge.label  <- phy at edge.label[index]
-    phy at edge.length <- phy at edge.length[index]
-    phy
-}
-
 myplot <- function(x, type = "phylogram", use.edge.length = TRUE,
                        node.pos = NULL, show.tip.label = TRUE,
                        show.node.label = FALSE, edge.color = "black",



More information about the Phylobase-commits mailing list