EVOLUTION-MANAGER
Edit File: endpoints.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: Locate Endpoints by Time</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 endpoints {xts}"><tr><td>endpoints {xts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Locate Endpoints by Time </h2> <h3>Description</h3> <p>Extract index values of a given <code>xts</code> object corresponding to the <em>last</em> observations given a period specified by <code>on</code> </p> <h3>Usage</h3> <pre> endpoints(x, on="months", k=1) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p> an xts object </p> </td></tr> <tr valign="top"><td><code>on</code></td> <td> <p> the periods endpoints to find as a character string </p> </td></tr> <tr valign="top"><td><code>k</code></td> <td> <p> along every k-th element - see notes </p> </td></tr> </table> <h3>Details</h3> <p><code>endpoints</code> returns a numeric vector corresponding to the <em>last</em> observation in each period specified by <code>on</code>, with a zero added to the beginning of the vector, and the index of the last observation in <code>x</code> at the end. </p> <p>Valid values for the argument <code>on</code> include: “us” (microseconds), “microseconds”, “ms” (milliseconds), “milliseconds”, “secs” (seconds), “seconds”, “mins” (minutes), “minutes”, “hours”, “days”, “weeks”, “months”, “quarters”, and “years”. </p> <h3>Value</h3> <p>A numeric vector of endpoints beginning with 0 and ending with the a value equal to the length of the x argument. </p> <h3>Author(s)</h3> <p> Jeffrey A. Ryan </p> <h3>Examples</h3> <pre> data(sample_matrix) endpoints(sample_matrix) endpoints(sample_matrix, 'weeks') </pre> <hr /><div style="text-align: center;">[Package <em>xts</em> version 0.12.2 <a href="00Index.html">Index</a>]</div> </body></html>