timeSeries (version 3022.101.2)

runlengths: 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

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 DataCamp Workspace