hist.POSIXt             package:graphics             R Documentation

_H_i_s_t_o_g_r_a_m _o_f _a _D_a_t_e _o_r _D_a_t_e-_T_i_m_e _O_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Method for 'hist' applied to date or date-time objects.

_U_s_a_g_e:

     ## S3 method for class 'POSIXt':
     hist(x, breaks, ...,
          xlab = deparse(substitute(x)),
          plot = TRUE, freq = FALSE,
          start.on.monday = TRUE, format)

     ## S3 method for class 'Date':
     hist(x, breaks, ...,
          xlab = deparse(substitute(x)),
          plot = TRUE, freq = FALSE,
          start.on.monday = TRUE, format)

_A_r_g_u_m_e_n_t_s:

       x: an object inheriting from class '"POSIXt"' or '"Date"'.

  breaks: a vector of cut points _or_ number giving the number of
          intervals which 'x' is to be cut into _or_ an interval
          specification, one of '"days"', '"weeks"', '"months"' or
          '"years"', plus '"secs"', '"mins"', '"hours"' for date-time
          objects. 

     ...: graphical parameters, or arguments to 'hist.default' such as
          'include.lowest', 'right' and 'labels'.

    xlab: a character string giving the label for the x axis, if
          plotted.

    plot: logical.  If 'TRUE' (default), a histogram is plotted,
          otherwise a list of breaks and counts is returned.

    freq: logical; if 'TRUE', the histogram graphic is a representation
          of frequencies, i.e, the 'counts' component of the result; if
          'FALSE', _relative_ frequencies ("probabilities") are
          plotted.

start.on.monday: logical. If 'breaks = "weeks"', should the week start
          on Mondays or Sundays?

  format: for the x-axis labels. See 'strptime'.

_V_a_l_u_e:

     An object of class '"histogram"': see 'hist'.

_S_e_e _A_l_s_o:

     'seq.POSIXt', 'axis.POSIXct', 'hist'

_E_x_a_m_p_l_e_s:

     hist(.leap.seconds, "years", freq = TRUE)
     hist(.leap.seconds,
          seq(ISOdate(1970, 1, 1), ISOdate(2010, 1, 1), "5 years"))

     ## 100 random dates in a 10-week period
     random.dates <- as.Date("2001/1/1") + 70*runif(100)
     hist(random.dates, "weeks", format = "%d %b")

