]> git.donarmstrong.com Git - ape.git/commitdiff
final corrections for ape 3.0-6
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Mon, 22 Oct 2012 10:13:38 +0000 (10:13 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Mon, 22 Oct 2012 10:13:38 +0000 (10:13 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@198 6e262413-ae40-0410-9e79-b911bd7a66b7

DESCRIPTION
NEWS
R/drop.tip.R
R/plot.phylo.R

index 32f124c030a017abadeee6736547768327ab1d7f..3904cc86376b74ce669d4882c7fc737c7e7818e9 100644 (file)
@@ -1,6 +1,6 @@
 Package: ape
 Version: 3.0-6
-Date: 2012-10-12
+Date: 2012-10-20
 Title: Analyses of Phylogenetics and Evolution
 Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Andrei-Alin Popescu, Klaus Schliep, Korbinian Strimmer, Damien de Vienne
 Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
diff --git a/NEWS b/NEWS
index 6ba9bc404c66d08cc4799337a6b0aa49b8d4a685..e90cec15c61f7d4d1bae3e76033142edcfac8b3d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,8 +9,7 @@ NEW FEATURES
 
     o The three new functions node.depth.edgelength, node.height, and
       node.height.clado make some internal code available from R. See
-      ?node.depth (which was already available and documented) for
-      details.
+      ?node.depth (which was already documented) for details.
 
 
 BUG FIXES
@@ -18,8 +17,15 @@ BUG FIXES
     o reorder(, "pruningwise") made R crash if the rows of the edge
       matrix are in random order: this is now fixed.
 
-    o drop.tip() sometimes shuffled node labels (thanks to Rebecca Best
-      for the report).
+    o drop.tip() sometimes shuffled node labels (thanks to Rebecca
+      Best for the report).
+
+    o drop.tip(phy, "") returned a tree with zero-length tip labels:
+      it now returns the tree unchanged (thanks to Brian Anacker for
+      the report).
+
+    o plot.phylo() made R crash if the tree has zero-length tip
+      labels: it now returns NULL (thanks again to Brian Anacker).
 
 
 OTHER CHANGES
index e9bd5c037364f4f8e20604ac3aff8ae6755a7b16..a720a7ca1561be9b9ab0cd166509df4109834771 100644 (file)
@@ -1,4 +1,4 @@
-## drop.tip.R (2012-10-06)
+## drop.tip.R (2012-10-20)
 
 ##   Remove Tips in a Phylogenetic Tree
 
@@ -101,6 +101,7 @@ drop.tip <-
         if (is.character(tip))
             tip <- which(phy$tip.label %in% tip)
     }
+    if (!length(tip)) return(phy)
     if (any(tip > Ntip))
         warning("some tip numbers were higher than the number of tips")
 
index 862291de6ccd885bddeaa5a40f09a70f87a8a1ee..4c23c6f0032361e6c3b6181941cbfd4c83ad3f24 100644 (file)
@@ -1,4 +1,4 @@
-## plot.phylo.R (2012-10-02)
+## plot.phylo.R (2012-10-20)
 
 ##   Plot Phylogenies
 
@@ -18,8 +18,8 @@ plot.phylo <-
              tip.color = "black", plot = TRUE, rotate.tree = 0, ...)
 {
     Ntip <- length(x$tip.label)
-    if (Ntip == 1) {
-        warning("found only one tip in the tree")
+    if (Ntip < 2) {
+        warning("found less than 2 tips in the tree")
         return(NULL)
     }
     if (any(tabulate(x$edge[, 1]) == 1))
@@ -421,7 +421,7 @@ phylogram.plot <- function(edge, Ntip, Nnode, xx, yy, horizontal,
         yy <- xx
         xx <- tmp
     }
-    ## un trait vertical à chaque noeud...
+    ## un trait vertical a chaque noeud...
     x0v <- xx[nodes]
     y0v <- y1v <- numeric(Nnode)
     ## store the index of each node in the 1st column of edge: