EVOLUTION-MANAGER
Edit File: periodicity.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Approximate Series Periodicity</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for periodicity {xts}"><tr><td>periodicity {xts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Approximate Series Periodicity </h2> <h3>Description</h3> <p>Estimate the periodicity of a time-series-like object by calculating the median time between observations in days. </p> <h3>Usage</h3> <pre> periodicity(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p> time-series-like object </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p> unused </p> </td></tr> </table> <h3>Details</h3> <p>A simple wrapper to quickly estimate the periodicity of a given data. Returning an object of type <code>periodicity</code>. </p> <p>This calculates the median number of days between observations as a difftime object, the numerical difference, the units of measurement, and the derived scale of the data as a string. </p> <p>The time index currently must be of either <code>Date</code> or <code>POSIX</code> class, or coercible to such. </p> <p>The only list item of note is the <code>scale</code>. This is an estimate of the periodicity of the data in common terms - e.g. 7 day dialy data is best described as ‘weekly’, and would be returned as such. </p> <p>Possible <code>scale</code> values are: </p> <p>‘minute’,‘hourly’, ‘daily’,‘weekly’, ‘monthly’,‘quarterly’, and ‘yearly’. </p> <h3>Value</h3> <p>An object containing a list containing the <code>difftime</code> object, frequency, units, and suitable scale. </p> <h3>Note</h3> <p>This function is only a <em>good estimate</em> for the underlying periodicity. If the series is too short, or has <em>no</em> real periodicity, the return values will obviously be wrong. That said, it is quite robust and used internally within <span class="pkg">xts</span>. </p> <h3>Author(s)</h3> <p> Jeffrey A. Ryan </p> <h3>See Also</h3> <p><code><a href="../../base/html/difftime.html">difftime</a></code> </p> <h3>Examples</h3> <pre> zoo.ts <- zoo(rnorm(231),as.Date(13514:13744,origin="1970-01-01")) periodicity(zoo.ts) </pre> <hr /><div style="text-align: center;">[Package <em>xts</em> version 0.12.2 <a href="00Index.html">Index</a>]</div> </body></html>