[Phylobase-commits] r113 - in pkg: . R tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 22 18:46:31 CET 2008


Author: jombart
Date: 2008-02-22 18:46:31 +0100 (Fri, 22 Feb 2008)
New Revision: 113

Modified:
   pkg/R/identify.R
   pkg/TODO
   pkg/tests/plottest.R
Log:
Adressed issues with plot of phylo4d objects. 


Modified: pkg/R/identify.R
===================================================================
--- pkg/R/identify.R	2008-02-17 17:29:32 UTC (rev 112)
+++ pkg/R/identify.R	2008-02-22 17:46:31 UTC (rev 113)
@@ -4,7 +4,7 @@
 ##   (class definitions)
 setMethod("identify","phylo4",
            function(x,n=1,...) {
-               plot(x)
+               plot(x, ...)
                last <- .last_plot.phylo # information return from plot.phylo
                N.tip <- nTips(x)
                N.node <- nNodes(x)

Modified: pkg/TODO
===================================================================
--- pkg/TODO	2008-02-17 17:29:32 UTC (rev 112)
+++ pkg/TODO	2008-02-22 17:46:31 UTC (rev 113)
@@ -10,11 +10,12 @@
 
 ## Plotting
 ### phylo4d objects
-  * verify that identify works with this version
-  * error in plotting a subsetted tree: see tests/plottest.R
+  * verify that identify works with this version -- [yes] TJ
+  * error in plotting a subsetted tree: see tests/plottest.R -- [no error but mistake in @node.label returned by 'subset'] TJ.
   * modify phylo4 method to allow "Singles" (plot.phylo doesn't)?
-  * plotting with data and `show.node.label` scrambles order of node labels *this is really a problem with ade4 vs ape ordering of nodes*
-  * plotting with subsetted data can throw error (see tests/plottest.R)
+  * plotting with data and `show.node.label` scrambles order of node
+   labels *this is really a problem with ade4 vs ape ordering of nodes* -- [fixed since we no longer use ade4 for plotting] TJ
+  * plotting with subsetted data can throw error (see tests/plottest.R) -- [comes from 'subset', see above] TJ
   * multiPhylo4x plotting
 
 ## Data classes

Modified: pkg/tests/plottest.R
===================================================================
--- pkg/tests/plottest.R	2008-02-17 17:29:32 UTC (rev 112)
+++ pkg/tests/plottest.R	2008-02-22 17:46:31 UTC (rev 113)
@@ -9,8 +9,12 @@
 plot(g1,show.node.label=TRUE)
 ## be careful with this: works if par("fin")=c(5.56,6.77)
 ##                       fails if par("fin")=c(4.87,6.77)
-try(plot(g2,show.node.label=TRUE),silent=TRUE)
+##try(plot(g2,show.node.label=TRUE),silent=TRUE)
+## Here, R was complaining about a lack of room to plot data
+## so nothing abnormal. -- TJ
+plot(g2,show.node.label=TRUE,cex.lab=.5,cex.sym=.5,box=FALSE)
 
+
 g2B <- as(g2,"phylog")
 ##  Note the numbering differences!
 
@@ -23,8 +27,14 @@
 g3 = subset(g2,tips.exclude=c("fuliginosa","fortis","magnirostris",
                  "conirostris","scandens"))
 plot(extract.tree(g3))  ## phylo4
-t1 <- try(plot(g3),silent=TRUE)                 ## phylo4d -- error
+t1 <- try(plot(g3),silent=TRUE)
+## no error but mistakes in node labels
+## because extract.tree has uncorrect @node.label (see below). -- TJ
+nNodes(g2)
+nNodes(g3)
+identical(g2 at node.label,g3 at node.label)
 
+
 ## Playing with new ways of plotting
 
 library(MASS)



More information about the Phylobase-commits mailing list