]> git.donarmstrong.com Git - ape.git/blobdiff - R/read.nexus.R
various corrections
[ape.git] / R / read.nexus.R
index 969d42c0e403c23c28bb459ecdc41dc1d2a3305c..abcd1314b8d3b7b91c7449a580446f453577c7b7 100644 (file)
@@ -53,7 +53,7 @@ clado.build <- function(tp)
         obj <- list(edge = matrix(c(2, 1), 1, 2), Nnode = 1)
         tp <- unlist(strsplit(tp, "[\\(\\);]"))
         obj$tip.label <- tp[2]
-        if (length(tp) == 3) obj$node.label <- tp[3]
+        if (tp[3] != "") obj$node.label <- tp[3]
         class(obj) <- "phylo"
         return(obj)
     }