]> git.donarmstrong.com Git - ape.git/blobdiff - R/DNA.R
a few changes and one bug fix
[ape.git] / R / DNA.R
diff --git a/R/DNA.R b/R/DNA.R
index a7285170ec3aef68cf4874043ae6386edd034d30..722f7b4b9c9cabe100f3a7cd30deed790ff354cb 100644 (file)
--- a/R/DNA.R
+++ b/R/DNA.R
@@ -1,4 +1,4 @@
-## DNA.R (2010-09-01)
+## DNA.R (2010-10-19)
 
 ##   Manipulations and Comparisons of DNA Sequences
 
@@ -94,7 +94,7 @@ as.matrix.DNAbin <- function(x, ...)
 as.list.DNAbin <- function(x, ...)
 {
     if (is.list(x)) return(x)
-    if (is.vector(x)) obj <- list(x)
+    if (is.null(dim(x))) obj <- list(x) # cause is.vector() doesn't work
     else { # matrix
         n <- nrow(x)
         obj <- vector("list", n)