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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 5 11:22:02 CEST 2008


Author: pdc
Date: 2008-08-05 11:22:02 +0200 (Tue, 05 Aug 2008)
New Revision: 240

Modified:
   branches/pdcgsoc/misc/temp.R
Log:
handle the case where no edge lengths are available

Modified: branches/pdcgsoc/misc/temp.R
===================================================================
--- branches/pdcgsoc/misc/temp.R	2008-08-05 09:06:36 UTC (rev 239)
+++ branches/pdcgsoc/misc/temp.R	2008-08-05 09:22:02 UTC (rev 240)
@@ -183,6 +183,10 @@
         xx = numeric(Nedges), 
         ## record the order that nodes are visited in
         traverse = NULL) 
+    if(is.null(edgeLength(phy))) {
+        # TODO there should be an abstraction for assigning branch lengths
+        phy at edge.length <- rep(1, nrow(phy at edge))
+    }
     
     # TODO tip ordering should be dealt with at a higher level
     # if(!is.null(tip.order)) { 
@@ -374,7 +378,8 @@
 # )
 
 treeWpoly <- as(read.tree(text = '((a,b,c),d);'), 'phylo4')
-print(phyloXXYY(treeWpoly))
+# print(phyloXXYY(treeWpoly))
+treePlot(treeWpoly)
 
 # tree1 <- as(rtree(10), 'phylo4')
 # tree1 at tip.label <- replicate(10, paste(sample(LETTERS, sample(2:20, 1)), collapse = ""))



More information about the Phylobase-commits mailing list