

_T_i_m_e _W_i_n_d_o_w_s

     window(x, start, end, frequency, deltat)

_A_r_g_u_m_e_n_t_s:

       x: a time-series or other object.

   start: the start time of the period of interest.

     end: the end time of the period of interest.

frequency: the new sampling frequency, which should be a
          sub-multiple of the original frequency.

  deltat: the new time interval between observations, which
          should be a multiple of the original frequency.

_D_e_s_c_r_i_p_t_i_o_n:

     `window' is a generic function which extracts the sub-
     set of the object `x' observed between the times
     `start' and `end'.

_D_e_t_a_i_l_s:

     The default method applies to objects with a `tsp'
     attribute, or vectors or matrices (which are assumed to
     have been observed at times `1' to `NROW(x)').

     The start and end times are rounded to the nearest sam-
     pling time. This is for S compatibility.

_V_a_l_u_e:

     An object with a `tsp' attribute, and with class that
     of the `x' unless (as for time series) that class is
     changed by subsetting. The `ts' ensures the result has
     class `"ts"'.

_S_e_e _A_l_s_o:

     `time', `ts'.

_E_x_a_m_p_l_e_s:

     data(presidents)
     sixties <- window(presidents, 1960, c(1969,4))

     data(sunspots)
     ## all June values in 20th century
     window(sunspots, start=c(1901,6), frequency=1)

