EVOLUTION-MANAGER
Edit File: hist.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: Histogram of a Date or Date-Time Object</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 hist.POSIXt {graphics}"><tr><td>hist.POSIXt {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Histogram of a Date or Date-Time Object</h2> <h3>Description</h3> <p>Method for <code><a href="hist.html">hist</a></code> applied to date or date-time objects. </p> <h3>Usage</h3> <pre> ## S3 method for class 'POSIXt' hist(x, breaks, ..., xlab = deparse(substitute(x)), plot = TRUE, freq = FALSE, start.on.monday = TRUE, format, right = TRUE) ## S3 method for class 'Date' hist(x, breaks, ..., xlab = deparse(substitute(x)), plot = TRUE, freq = FALSE, start.on.monday = TRUE, format, right = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an object inheriting from class <code>"POSIXt"</code> or <code>"Date"</code>.</p> </td></tr> <tr valign="top"><td><code>breaks</code></td> <td> <p>a vector of cut points <em>or</em> number giving the number of intervals which <code>x</code> is to be cut into <em>or</em> an interval specification, one of <code>"days"</code>, <code>"weeks"</code>, <code>"months"</code>, <code>"quarters"</code> or <code>"years"</code>, plus <code>"secs"</code>, <code>"mins"</code>, <code>"hours"</code> for date-time objects. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p><a href="par.html">graphical parameters</a>, or arguments to <code><a href="hist.html">hist.default</a></code> such as <code>include.lowest</code>, <code>right</code> and <code>labels</code>.</p> </td></tr> <tr valign="top"><td><code>xlab</code></td> <td> <p>a character string giving the label for the x axis, if plotted.</p> </td></tr> <tr valign="top"><td><code>plot</code></td> <td> <p>logical. If <code>TRUE</code> (default), a histogram is plotted, otherwise a list of breaks and counts is returned.</p> </td></tr> <tr valign="top"><td><code>freq</code></td> <td> <p>logical; if <code>TRUE</code>, the histogram graphic is a representation of frequencies, i.e, the <code>counts</code> component of the result; if <code>FALSE</code>, <em>relative</em> frequencies (probabilities) are plotted.</p> </td></tr> <tr valign="top"><td><code>start.on.monday</code></td> <td> <p>logical. If <code>breaks = "weeks"</code>, should the week start on Mondays or Sundays?</p> </td></tr> <tr valign="top"><td><code>format</code></td> <td> <p>for the x-axis labels. See <code><a href="../../base/html/strptime.html">strptime</a></code>.</p> </td></tr> <tr valign="top"><td><code>right</code></td> <td> <p>logical; if <code>TRUE</code>, the histogram cells are right-closed (left open) intervals.</p> </td></tr> </table> <h3>Details</h3> <p>Note that unlike the default method, <code>breaks</code> is a required argument. </p> <p>Using <code>breaks = "quarters"</code> will create intervals of 3 calendar months, with the intervals beginning on January 1, April 1, July 1 or October 1, based upon <code>min(x)</code> as appropriate. </p> <p>With the default <code>right = TRUE</code>, breaks will be set on the last day of the previous period when <code>breaks</code> is <code>"months"</code>, <code>"quarters"</code> or <code>"years"</code>. Use <code>right = FALSE</code> to set them to the first day of the interval shown in each bar. </p> <h3>Value</h3> <p>An object of class <code>"histogram"</code>: see <code><a href="hist.html">hist</a></code>. </p> <h3>See Also</h3> <p><code><a href="../../base/html/seq.POSIXt.html">seq.POSIXt</a></code>, <code><a href="axis.POSIXct.html">axis.POSIXct</a></code>, <code><a href="hist.html">hist</a></code> </p> <h3>Examples</h3> <pre> hist(.leap.seconds, "years", freq = TRUE) hist(.leap.seconds, seq(ISOdate(1970, 1, 1), ISOdate(2020, 1, 1), "5 years")) rug(.leap.seconds, lwd=2) ## 100 random dates in a 10-week period random.dates <- as.Date("2001/1/1") + 70*stats::runif(100) hist(random.dates, "weeks", format = "%d %b") </pre> <hr /><div style="text-align: center;">[Package <em>graphics</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>