[Adephylo-commits] r191 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 15 18:43:13 CEST 2013


Author: jombart
Date: 2013-05-15 18:43:12 +0200 (Wed, 15 May 2013)
New Revision: 191

Modified:
   pkg/R/bullseye.R
Log:
redone a fix I probably did yesterday, and forgot to commit

Modified: pkg/R/bullseye.R
===================================================================
--- pkg/R/bullseye.R	2013-05-14 14:12:05 UTC (rev 190)
+++ pkg/R/bullseye.R	2013-05-15 16:43:12 UTC (rev 191)
@@ -31,6 +31,16 @@
     }
 
     ## col.tips.by
+    if(!is.null(col.tips.by) && is.data.frame(col.tips.by)){
+        old.names <- row.names(col.tips.by)
+        col.tips.by <- unlist(col.tips.by)
+        names(col.tips.by) <- old.names
+    }
+    if(!is.null(col.tips.by) && is.matrix(col.tips.by)){
+        old.names <- rownames(col.tips.by)
+        col.tips.by <- as.vector(col.tips.by)
+        names(col.tips.by) <- old.names
+    }
     if(!is.null(col.tips.by) && !is.null(names(col.tips.by))){
         col.tips.by <- col.tips.by[phy$tip.label]
     }
@@ -43,6 +53,11 @@
 
 
     ## PLOT THE PHYLOGENY
+    ## window setting
+    oxpd <- par("xpd")
+    par(xpd=TRUE)
+    on.exit(par(oxpd))
+
     ## handle color info
     if(!is.null(col.tips.by)){
         tip.col.info <- any2col(col.tips.by, col.pal=col.pal[[1]])
@@ -53,11 +68,6 @@
 
 
     ## HANDLE THE 'BULLSEYE' ##
-    ## window setting
-    oxpd <- par("xpd")
-    par(xpd=TRUE)
-    on.exit(par(oxpd))
-
     ## annot info
     if(is.null(circ.unit)){
         annot.max <- 0.5*diff(par("usr")[1:2])



More information about the Adephylo-commits mailing list