]> git.donarmstrong.com Git - ape.git/blobdiff - R/read.nexus.R
faster rcoal... at last!
[ape.git] / R / read.nexus.R
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
 }