]> git.donarmstrong.com Git - ape.git/blob - man/where.Rd
a few changes....
[ape.git] / man / where.Rd
1 \name{where}
2 \alias{where}
3 \title{Find Patterns in DNA Sequences}
4 \description{
5   This function finds patterns in a single or a set of DNA sequences.
6 }
7 \usage{
8 where(x, pattern)
9 }
10 \arguments{
11   \item{x}{an object of class \code{"DNAbin"}.}
12   \item{pattern}{a character string to be searched in \code{x}.}
13 }
14 \details{
15   If \code{x} is a vector, the function returns a single vector giving
16   the position(s) where the pattern was found. If \code{x} is a matrix
17   or a list, it returns a list with the positions of the pattern for
18   each sequence.
19
20   Patterns may be overlapping. For instance, if \code{pattern = "tata"}
21   and the sequence starts with `tatata', then the vector returned will
22   be c(1, 3).
23 }
24 \value{
25   a vector of integers or a list of such vectors.
26 }
27 \author{Emmanuel Paradis}
28 \seealso{
29   \code{\link{DNAbin}}, \code{\link{image.DNAbin}}
30 }
31 \examples{
32 data(woodmouse)
33 where(woodmouse, "tata")
34 }
35 \keyword{manip}