- n <- 1 # <- if is.vector(x)
- if (is.list(x)) n <- length(x)
- else if (is.matrix(x)) n <- dim(x)[1]
- if (n > 1) cat(n, "DNA sequences in binary format.\n")
- else cat("1 DNA sequence in binary format.\n")
+ if (!all(unlist(lapply(list(...), is.list))))
+ stop("the 'c' method for \"DNAbin\" accepts only lists")
+ structure(NextMethod("c"), class = "DNAbin")