Histogram of a Date or Date-Time Object
hist applied to date or date-time objects.
"hist"(x, breaks, ..., xlab = deparse(substitute(x)), plot = TRUE, freq = FALSE, start.on.monday = TRUE, format)"hist"(x, breaks, ..., xlab = deparse(substitute(x)), plot = TRUE, freq = FALSE, start.on.monday = TRUE, format)
- an object inheriting from class
a vector of cut points or number giving the number of
xis to be cut into or an interval specification, one of
"hours"for date-time objects.
- graphical parameters, or arguments to
- a character string giving the label for the x axis, if plotted.
- logical. If
TRUE(default), a histogram is plotted, otherwise a list of breaks and counts is returned.
- logical; if
TRUE, the histogram graphic is a representation of frequencies, i.e, the
countscomponent of the result; if
FALSE, relative frequencies (probabilities) are plotted.
- logical. If
breaks = "weeks", should the week start on Mondays or Sundays?
- for the x-axis labels. See
Note that unlike the default method,
breaks is a required argument.
breaks = "quarters" will create intervals of 3 calendar
months, with the intervals beginning on January 1, April 1,
July 1 or October 1, based upon
min(x) as appropriate.
An object of class
hist(.leap.seconds, "years", freq = TRUE) hist(.leap.seconds, seq(ISOdate(1970, 1, 1), ISOdate(2015, 1, 1), "5 years")) ## 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")