EVOLUTION-MANAGER
Edit File: seq.Date.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 Dates</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.Date {base}"><tr><td>seq.Date {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate Regular Sequences of Dates</h2> <h3>Description</h3> <p>The method for <code><a href="seq.html">seq</a></code> for objects of class class <code>"<a href="Dates.html">Date</a>"</code> representing calendar dates. </p> <h3>Usage</h3> <pre> ## S3 method for class 'Date' 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 days. </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>"day"</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> <p>See <code><a href="seq.POSIXt.html">seq.POSIXt</a></code> for the details of <code>"month"</code>. </p> </li></ul> <h3>Value</h3> <p>A vector of class <code>"Date"</code>. </p> <h3>See Also</h3> <p><code><a href="Dates.html">Date</a></code></p> <h3>Examples</h3> <pre> ## first days of years seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years") ## by month seq(as.Date("2000/1/1"), by = "month", length.out = 12) ## quarters seq(as.Date("2000/1/1"), as.Date("2003/1/1"), by = "quarter") ## find all 7th of the month between two dates, the last being a 7th. st <- as.Date("1998-12-17") en <- as.Date("2000-1-7") ll <- seq(en, st, by = "-1 month") rev(ll[ll > st & ll < en]) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>