cut.POSIXt               package:base               R Documentation

_C_o_n_v_e_r_t _a _D_a_t_e-_T_i_m_e _O_b_j_e_c_t _t_o _a _F_a_c_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     Method for `cut' applied to date-time objects.

_U_s_a_g_e:

     cut(x, breaks, labels=NULL, start.on.monday=TRUE, ...)

_A_r_g_u_m_e_n_t_s:

       x: an object inheriting from class `"POSIXt"'.

  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 `"secs"', `"mins"', `"hours"',
          `"days"', `"weeks"', `"months"' or `"years"'. 

  labels: labels for the levels of the resulting category.  By default,
          labels are constructed using `"(a,b]"' interval notation. If
          `labels = FALSE', simple integer codes are returned instead
          of a factor. 

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

     ...: arguments to be passed to or from other methods.

_V_a_l_u_e:

     A factor is returned, unless `labels = FALSE' which returns the
     integer level codes.

_S_e_e _A_l_s_o:

     `seq.POSIXt', `cut'

_E_x_a_m_p_l_e_s:

     ## random dates in a 10-week period
     cut(ISOdate(2001, 1, 1) + 70*86400*runif(100), "weeks")

