X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=man%2FDNAbin.Rd;h=bd9abcca093375984d690089c0e11d39d2fb1638;hb=e43c90282fbbdbc38d185cee55cfa0d446554c81;hp=b08446f6005a67dae11e2b9503a3f76bb14112e7;hpb=4764f968dcbb65566d8196c154179d629da79fb2;p=ape.git diff --git a/man/DNAbin.Rd b/man/DNAbin.Rd index b08446f..bd9abcc 100644 --- a/man/DNAbin.Rd +++ b/man/DNAbin.Rd @@ -1,33 +1,35 @@ \name{DNAbin} \alias{DNAbin} \alias{print.DNAbin} -\alias{summary.DNAbin} \alias{[.DNAbin} \alias{rbind.DNAbin} \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{ These functions help to manipulate DNA sequences coded in the bit-level coding scheme. } \usage{ -\method{print}{DNAbin}(x, \dots) -\method{summary}{DNAbin}(object, printlen = 6, digits = 3, \dots) +\method{print}{DNAbin}(x, printlen = 6, digits = 3, \dots) \method{rbind}{DNAbin}(\dots) \method{cbind}{DNAbin}(\dots, check.names = TRUE, fill.with.gaps = FALSE, quiet = FALSE) -\method{[}{DNAbin}(x, i, j, drop = TRUE) +\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{ \item{x, object}{an object of class \code{"DNAbin"}.} \item{\dots}{either further arguments to be passed to or from other - methods in the case of \code{print}, \code{summary}, and - \code{as.matrix}, or a series of objects of class \code{"DNAbin"} in - the case of \code{rbind}, \code{cbind}, and \code{c}.} + methods in the case of \code{print}, \code{as.matrix}, and + \code{labels}, or a series of objects of class \code{"DNAbin"} in the + case of \code{rbind}, \code{cbind}, and \code{c}.} \item{printlen}{the number of labels to print (6 by default).} \item{digits}{the number of digits to print (3 by default).} \item{check.names}{a logical specifying whether to check the rownames @@ -40,17 +42,19 @@ 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).} - \item{drop}{logical; if \code{TRUE} (the default), the returned object - is of the lowest possible dimension.} + 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).} } \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. + 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: + this is to avoid dropping rownames when selecting a single sequence. These functions are provided to manipulate easily DNA sequences coded with the bit-level coding scheme. The latter allows much faster @@ -68,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}, @@ -77,11 +81,15 @@ \references{ Paradis, E. (2007) A Bit-Level Coding Scheme for Nucleotides. \url{http://ape.mpl.ird.fr/misc/BitLevelCodingScheme_20April2007.pdf} + + Paradis, E. (2012) \emph{Analysis of Phylogenetics and Evolution with + R (Second Edition).} New York: Springer. } -\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}} +\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}. @@ -89,9 +97,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, ])