EVOLUTION-MANAGER
Edit File: tsp.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: Tsp Attribute of Time-Series-like Objects</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 tsp {stats}"><tr><td>tsp {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Tsp Attribute of Time-Series-like Objects</h2> <h3>Description</h3> <p><code>tsp</code> returns the <code>tsp</code> attribute (or <code>NULL</code>). It is included for compatibility with S version 2. <code>tsp<-</code> sets the <code>tsp</code> attribute. <code>hasTsp</code> ensures <code>x</code> has a <code>tsp</code> attribute, by adding one if needed. </p> <h3>Usage</h3> <pre> tsp(x) tsp(x) <- value hasTsp(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a vector or matrix or univariate or multivariate time-series.</p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p>a numeric vector of length 3 or <code>NULL</code>.</p> </td></tr> </table> <h3>Details</h3> <p>The <code>tsp</code> attribute gives the start time <em>in time units</em>, the end time and the frequency (the number of observations per unit of time, e.g. 12 for a monthly series). </p> <p>Assignments are checked for consistency. </p> <p>Assigning <code>NULL</code> which removes the <code>tsp</code> attribute <em>and</em> any <code>"ts"</code> (or <code>"mts"</code>) class of <code>x</code>. </p> <h3>Value</h3> <p>An object which differs from <code>x</code> only in the <code>tsp</code> attribute (unless <code>NULL</code> is assigned). </p> <p><code>hasTsp</code> adds, if needed, an attribute with a start time and frequency of 1 and end time <code><a href="../../base/html/nrow.html">NROW</a>(x)</code>. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="ts.html">ts</a></code>, <code><a href="time.html">time</a></code>, <code><a href="start.html">start</a></code>. </p> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>