]> git.donarmstrong.com Git - ape.git/blobdiff - R/read.nexus.R
final commit for ape 3.0-8
[ape.git] / R / read.nexus.R
index 642bee7d15c3dcc6c2066a138f7f4e05cfa1534a..2f4177e5aed51ebab7d48969b6fda7e7db86b421 100644 (file)
@@ -1,8 +1,8 @@
-## read.nexus.R (2011-03-26)
+## read.nexus.R (2012-09-28)
 
 ##   Read Tree File in Nexus Format
 
-## Copyright 2003-2011 Emmanuel Paradis and 2010 Klaus Schliep
+## Copyright 2003-2012 Emmanuel Paradis and 2010 Klaus Schliep
 
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
@@ -16,6 +16,7 @@
     names(phy) <- nms
     if (all(phy$node.label == "")) phy$node.label <- NULL
     class(phy) <- "phylo"
+    attr(phy, "order") <- "cladewise"
     phy
 }
 
@@ -97,6 +98,7 @@ clado.build <- function(tp)
         if (all(obj$node.label == "NA")) NULL
         else gsub("^NA", "", obj$node.label)
     class(obj) <- "phylo"
+    attr(obj, "order") <- "cladewise"
     obj
 }
 
@@ -247,9 +249,5 @@ read.nexus <- function(file, tree.names = NULL)
         class(trees) <- "multiPhylo"
         if (!all(nms.trees == "")) names(trees) <- nms.trees
     }
-    if (length(grep("[\\/]", file)) == 1)
-        if (!file.exists(file)) # suggestion by Francois Michonneau
-            file <- paste(getwd(), file, sep = "/")
-    attr(trees, "origin") <- file
     trees
 }