% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence_utilities.R
\name{sub_seq}
\alias{sub_seq}
\alias{subSeq}
\title{Find sub-sequences of identical elements in a vector.}
\usage{
sub_seq(x, item = NULL)

subSeq(x, item = NULL)
}
\arguments{
\item{x}{An atomic vector or a factor.}

\item{item}{Optionally a specific value to look for in \code{x}.}
}
\value{
A dataframe.
}
\description{
Find sub-sequences of identical elements in a vector.
}
\examples{

x <- c(1, 1, 1, 0, 0, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 3)
sub_seq(x)
sub_seq(x, item=1)
}
\seealso{
\code{\link{rle}}
}
\author{
Søren Højsgaard, \email{sorenh@math.aau.dk}
}
\keyword{utilities}
