-## DNA.R (2010-05-17)
+## DNA.R (2010-07-13)
## Manipulations and Comparisons of DNA Sequences
x
}
+as.list.DNAbin <- function(x, ...)
+{
+ if (is.list(x)) return(x)
+ if (is.vector(x)) obj <- list(x)
+ else { # matrix
+ n <- nrow(x)
+ obj <- vector("list", n)
+ for (i in 1:n) obj[[i]] <- x[i, ]
+ names(obj) <- rownames(x)
+ }
+ class(obj) <- "DNAbin"
+ obj
+}
+
rbind.DNAbin <- function(...)
### works only with matrices for the moment
{