periodicity {quantmod}R Documentation

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

Details

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

Value

An object of class 'difftime'

Note

This should be extended to handle non-zoo objects, though that hasn't happened : \

Author(s)

Jeffrey A. Ryan

See Also

difftime

Examples

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

[Package quantmod version 0.2-5 Index]