runlengths {timeSeries}R 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)

[Package timeSeries version 2160.95 Index]