]> git.donarmstrong.com Git - ape.git/commitdiff
fixed a small bug in read.tree
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Mon, 27 Apr 2009 07:00:32 +0000 (07:00 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Mon, 27 Apr 2009 07:00:32 +0000 (07:00 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@71 6e262413-ae40-0410-9e79-b911bd7a66b7

ChangeLog
DESCRIPTION
R/read.nexus.R
R/read.tree.R

index 3a9c02b524c1387d98fd2ea31c3270c154f78a36..c154531e28da2bf5fa2b973bfce9f08c33588c3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ BUG FIXES
     o dist.gene() failed on most occasions with the default
       pairwise.deletion = FALSE.
 
+    o read.tree() failed to read correctly the tree name(s).
+
 
 
                CHANGES IN APE VERSION 2.3
index e89a11b1c4d75ae62b5b30aa2316d35a988b38ea..9bd41dc80ad2f69ab88ddad4cb9bc0de0d35526c 100644 (file)
@@ -1,6 +1,6 @@
 Package: ape
 Version: 2.3-1
-Date: 2009-04-31
+Date: 2009-04-27
 Title: Analyses of Phylogenetics and Evolution
 Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Gangolf Jobb, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Korbinian Strimmer, Damien de Vienne
 Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
index b8a17d8ee798ae16a9fca148f5353ed82c52ded6..3edcd3f5903b610f42edce93884ad2665cb640a0 100644 (file)
@@ -1,4 +1,4 @@
-## read.nexus.R (2009-01-19)
+## read.nexus.R (2009-04-01)
 
 ##   Read Tree File in Nexus Format
 
@@ -228,7 +228,8 @@ read.nexus <- function(file, tree.names = NULL)
         class(trees) <- "multiPhylo"
     }
     if (length(grep("[\\/]", file)) == 1)
-        file <- paste(getwd(), file, sep = "/")
+        if (!file.exists(file)) # suggestion by Francois Michonneau
+            file <- paste(getwd(), file, sep = "/")
     attr(trees, "origin") <- file
     trees
 }
index aa0b0294e0b695f82d58ab677d3732cd175b0756..d19acaef73edfa15054bb30a1158d647eaa5b06f 100644 (file)
@@ -1,4 +1,4 @@
-## read.tree.R (2009-03-29)
+## read.tree.R (2009-04-27)
 
 ##   Read Tree Files in Parenthetic Format
 
@@ -133,7 +133,7 @@ read.tree <- function(file = "", text = NULL, tree.names = NULL, skip = 0,
 
     tmp <- unlist(lapply(STRING, unname))
     tmpnames <- tmp[c(TRUE, FALSE)]
-    tree <- tmp[c(FALSE, TRUE)]
+    STRING <- tmp[c(FALSE, TRUE)]
     if (is.null(tree.names) && any(nzchar(tmpnames)))
         tree.names <- tmpnames