EVOLUTION-MANAGER
Edit File: is.regular.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: Check Regularity of a Series</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 is.regular {zoo}"><tr><td>is.regular {zoo}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Check Regularity of a Series</h2> <h3>Description</h3> <p><code>is.regular</code> is a regular function for checking whether a series of ordered observations has an underlying regularity or is even strictly regular. </p> <h3>Usage</h3> <pre> is.regular(x, strict = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an object (representing a series of ordered observations).</p> </td></tr> <tr valign="top"><td><code>strict</code></td> <td> <p>logical. Should strict regularity be checked? See details.</p> </td></tr> </table> <h3>Details</h3> <p>A time series can either be irregular (unequally spaced), strictly regular (equally spaced) or have an underlying regularity, i.e., be created from a regular series by omitting some observations. Here, the latter property is called <em>regular</em>. Consequently, regularity follows from strict regularity but not vice versa. </p> <p><code>is.regular</code> is a generic function for checking regularity (default) or strict regularity. Currently, it has methods for <code>"ts"</code> objects (which are always strictly regular), <code>"zooreg"</code> objects (which are at least regular), <code>"zoo"</code> objects (which can be either irregular, regular or even strictly regular) and a default method. The latter coerces <code>x</code> to <code>"zoo"</code> before checking its regularity. </p> <h3>Value</h3> <p>A logical is returned indicating whether <code>x</code> is (strictly) regular. </p> <h3>See Also</h3> <p><code><a href="zooreg.html">zooreg</a></code>, <code><a href="zoo.html">zoo</a></code></p> <h3>Examples</h3> <pre> ## checking of a strictly regular zoo series z <- zoo(1:10, seq(2000, 2002.25, by = 0.25), frequency = 4) z class(z) frequency(z) ## extraction of frequency attribute is.regular(z) is.regular(z, strict = TRUE) ## by omitting observations, the series is not strictly regular is.regular(z[-3]) is.regular(z[-3], strict = TRUE) ## checking of a plain zoo series without frequency attribute ## which is in fact regular z <- zoo(1:10, seq(2000, 2002.25, by = 0.25)) z class(z) frequency(z) ## data driven computation of frequency is.regular(z) is.regular(z, strict = TRUE) ## by omitting observations, the series is not strictly regular is.regular(z[-3]) is.regular(z[-3], strict = TRUE) suppressWarnings(RNGversion("3.5.0")) set.seed(1) ## checking of an irregular zoo series z <- zoo(1:10, rnorm(10)) z class(z) frequency(z) ## attempt of data-driven frequency computation is.regular(z) is.regular(z, strict = TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>zoo</em> version 1.8-11 <a href="00Index.html">Index</a>]</div> </body></html>