Learn R Programming

quantmod (version 0.2-5)

periodicity: Approximate Series Periodicity

Description

Estimate the periodicity of a time series like object by calculating the median time between observations in days.

Usage

periodicity(x, ...)

Arguments

x
a zoo-like object with a Date based index
...
unused

Value

  • An object of class 'difftime'

Details

A simple wrapper to quickly estimate the periodicity of a given data. Returning a statement of the median number of days between observations.

See Also

difftime

Examples

Run this code
zoo.ts <- zoo(rnorm(231),as.Date(13514:13744,origin="1970-01-01"))
periodicity(zoo.ts)

Run the code above in your browser using DataLab