]> git.donarmstrong.com Git - ape.git/blobdiff - man/DNAbin.Rd
cleaning of C files and update on simulation of OU process
[ape.git] / man / DNAbin.Rd
index 1b0ad705bccbc7c3a31da72528d462719bec7a62..e9535306f1ec2f4dd2a16f4d7b34fe73c7793707 100644 (file)
@@ -6,6 +6,7 @@
 \alias{cbind.DNAbin}
 \alias{as.matrix.DNAbin}
 \alias{c.DNAbin}
+\alias{as.list.DNAbin}
 \alias{labels.DNAbin}
 \title{Manipulate DNA Sequences in Bit-Level Format}
 \description{
@@ -20,6 +21,7 @@
 \method{[}{DNAbin}(x, i, j, drop = FALSE)
 \method{as.matrix}{DNAbin}(x, \dots)
 \method{c}{DNAbin}(\dots, recursive = FALSE)
+\method{as.list}{DNAbin}(x, \dots)
 \method{labels}{DNAbin}(object, \dots)
 }
 \arguments{
@@ -40,7 +42,7 @@
     are dropped.}
   \item{i, j}{indices of the rows and/or columns to select or to drop.
     They may be numeric, logical, or character (in the same way than for
-    standard R objects).}
+    standard \R objects).}
   \item{drop}{logical; if \code{TRUE}, the returned object is of the
     lowest possible dimension.}
   \item{recursive}{for compatibility with the generic (unused).}
@@ -48,7 +50,7 @@
 \details{
   These are all `methods' of generic functions which are here applied to
   DNA sequences stored as objects of class \code{"DNAbin"}. They are
-  used in the same way than the standard R functions to manipulate
+  used in the same way than the standard \R functions to manipulate
   vectors, matrices, and lists. Additionally, the operators \code{[[}
   and \code{$} may be used to extract a vector from a list. Note that
   the default of \code{drop} is not the same than the generic operator:
@@ -70,7 +72,7 @@
 
   \code{as.matrix} may be used to convert DNA sequences (of the same
   length) stored in a list into a matrix while keeping the names and the
-  class.
+  class. \code{as.list} does the reverse operation.
 }
 \value{
   an object of class \code{"DNAbin"} in the case of \code{rbind},
@@ -83,7 +85,8 @@
 \author{Emmanuel Paradis}
 \seealso{
   \code{\link{as.DNAbin}}, \code{\link{read.dna}},
-  \code{\link{read.GenBank}}, \code{\link{write.dna}}
+  \code{\link{read.GenBank}}, \code{\link{write.dna}}, ,
+  \code{\link{image.DNAbin}}
 
   The corresponding generic functions are documented in the package
   \pkg{base}.
@@ -91,9 +94,8 @@
 \examples{
 data(woodmouse)
 woodmouse
-summary(woodmouse)
-summary(woodmouse, 15, 6)
-summary(woodmouse[1:5, 1:300], 15, 6)
+print(woodmouse, 15, 6)
+print(woodmouse[1:5, 1:300], 15, 6)
 ### Just to show how distances could be influenced by sampling:
 dist.dna(woodmouse[1:2, ])
 dist.dna(woodmouse[1:3, ])