EVOLUTION-MANAGER
Edit File: seq.POSIXt.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: Generate Regular Sequences of Times</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 seq.POSIXt {base}"><tr><td>seq.POSIXt {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate Regular Sequences of Times</h2> <h3>Description</h3> <p>The method for <code><a href="seq.html">seq</a></code> for date-time classes. </p> <h3>Usage</h3> <pre> ## S3 method for class 'POSIXt' seq(from, to, by, length.out = NULL, along.with = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>from</code></td> <td> <p>starting date. Required.</p> </td></tr> <tr valign="top"><td><code>to</code></td> <td> <p>end date. Optional.</p> </td></tr> <tr valign="top"><td><code>by</code></td> <td> <p>increment of the sequence. Optional. See ‘Details’.</p> </td></tr> <tr valign="top"><td><code>length.out</code></td> <td> <p>integer, optional. Desired length of the sequence.</p> </td></tr> <tr valign="top"><td><code>along.with</code></td> <td> <p>take the length from the length of this argument.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>arguments passed to or from other methods.</p> </td></tr> </table> <h3>Details</h3> <p><code>by</code> can be specified in several ways. </p> <ul> <li><p> A number, taken to be in seconds. </p> </li> <li><p> A object of class <code><a href="difftime.html">difftime</a></code> </p> </li> <li><p> A character string, containing one of <code>"sec"</code>, <code>"min"</code>, <code>"hour"</code>, <code>"day"</code>, <code>"DSTday"</code>, <code>"week"</code>, <code>"month"</code>, <code>"quarter"</code> or <code>"year"</code>. This can optionally be preceded by a (positive or negative) integer and a space, or followed by <code>"s"</code>. </p> </li></ul> <p>The difference between <code>"day"</code> and <code>"DSTday"</code> is that the former ignores changes to/from daylight savings time and the latter takes the same clock time each day. <code>"week"</code> ignores DST (it is a period of 144 hours), but <code>"7 DSTdays"</code> can be used as an alternative. <code>"month"</code> and <code>"year"</code> allow for DST. </p> <p>The <a href="timezones.html">time zone</a> of the result is taken from <code>from</code>: remember that GMT means UTC (and not the time zone of Greenwich, England) and so does not have daylight savings time. </p> <p>Using <code>"month"</code> first advances the month without changing the day: if this results in an invalid day of the month, it is counted forward into the next month: see the examples. </p> <h3>Value</h3> <p>A vector of class <code>"POSIXct"</code>. </p> <h3>See Also</h3> <p><code><a href="DateTimeClasses.html">DateTimeClasses</a></code></p> <h3>Examples</h3> <pre> ## first days of years seq(ISOdate(1910,1,1), ISOdate(1999,1,1), "years") ## by month seq(ISOdate(2000,1,1), by = "month", length.out = 12) seq(ISOdate(2000,1,31), by = "month", length.out = 4) ## quarters seq(ISOdate(1990,1,1), ISOdate(2000,1,1), by = "quarter") # or "3 months" ## days vs DSTdays: use c() to lose the time zone. seq(c(ISOdate(2000,3,20)), by = "day", length.out = 10) seq(c(ISOdate(2000,3,20)), by = "DSTday", length.out = 10) seq(c(ISOdate(2000,3,20)), by = "7 DSTdays", length.out = 4) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>