runlengths {timeSeries} | R Documentation |
Computes runlengths of an univariate "timeSeries"
object.
runlengths(x, ...)
x |
an univariate time series of class |
... |
arguments to be passed. |
an object of class timeSeries
.
## random time series -
set.seed(4711)
x <- rnorm(12)
tS <- timeSeries(data=x, charvec=timeCalendar(), units="x")
tS
## return runlengths -
runlengths(tS)