
where(x, pattern)
x
is a vector, the function returns a single vector giving
the position(s) where the pattern was found. If x
is a matrix
or a list, it returns a list with the positions of the pattern for
each sequence. Patterns may be overlapping. For instance, if pattern = "tata"
and the sequence starts with `tatata', then the vector returned will
be c(1, 3).
DNAbin
, image.DNAbin
data(woodmouse)
where(woodmouse, "tata")
Run the code above in your browser using DataLab