EVOLUTION-MANAGER
Edit File: make.index.unique.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: Force Time Values To Be Unique</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 make.index.unique {xts}"><tr><td>make.index.unique {xts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Force Time Values To Be Unique </h2> <h3>Description</h3> <p>A generic function to force sorted time vectors to be unique. Useful for high-frequency time-series where original time-stamps may have identical values. For the case of xts objects, the default <code>eps</code> is set to ten microseconds. In practice this advances each subsequent identical time by <code>eps</code> over the previous (possibly also advanced) value. </p> <h3>Usage</h3> <pre> make.index.unique(x, eps = 1e-06, drop=FALSE, fromLast=FALSE, ...) make.time.unique(x, eps = 1e-06, drop=FALSE, fromLast=FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>An xts object, or POSIXct vector. </p> </td></tr> <tr valign="top"><td><code>eps</code></td> <td> <p>value to add to force uniqueness. </p> </td></tr> <tr valign="top"><td><code>drop</code></td> <td> <p>drop duplicates instead of adjusting by <code>eps</code> </p> </td></tr> <tr valign="top"><td><code>fromLast</code></td> <td> <p>if drop=TRUE, fromLast controls which duplicated times are dropped. If fromLast=FALSE, the earliest observation with an identical timestamp is kept with subsequent observations dropped. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>unused </p> </td></tr> </table> <h3>Details</h3> <p>The returned time-series object will have new time-stamps so that <code>isOrdered( .index(x) )</code> evaluates to TRUE. </p> <h3>Value</h3> <p>A modified version of x. </p> <h3>Note</h3> <p>Incoming values must be pre-sorted, and no check is done to make sure that this is the case. If the index values are of storage.mode ‘integer’, they will be coerced to ‘double’ if drop=FALSE. </p> <h3>Author(s)</h3> <p>Jeffrey A. Ryan </p> <h3>See Also</h3> <p><code><a href="align.time.html">align.time</a></code> </p> <h3>Examples</h3> <pre> ds <- options(digits.secs=6) # so we can see the change x <- xts(1:10, as.POSIXct("2011-01-21") + c(1,1,1,2:8)/1e3) x make.index.unique(x) options(ds) </pre> <hr /><div style="text-align: center;">[Package <em>xts</em> version 0.12.2 <a href="00Index.html">Index</a>]</div> </body></html>