Last data update: 2014.03.03

R: Runlengths of a Time Series
runlengthsR Documentation

Runlengths of a Time Series

Description

Computes runlengths of an univariate 'timeSeries' object.

Usage

runlengths(x, ...)

Arguments

x

an univariate time series of class 'timeSeries'.

...

arguments to be passed.

Value

returns an object of class timeSeries.

Examples

## random time series - 
   set.seed(4711)
   x <- rnorm(12)
   tS <- timeSeries(data=x, charvec=timeCalendar(), units="x")
   tS
   
## return runlengths -
   runlengths(tS)

Results