Learn R Programming

timeSeries (version 4021.104)

runlengths: Runlengths of a Time Series

Description

Computes runlengths of an univariate 'timeSeries' object.

Usage

runlengths(x, ...)

Value

returns an object of class timeSeries.

Arguments

x

an univariate time series of class 'timeSeries'.

...

arguments to be passed.

Examples

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

Run the code above in your browser using DataLab