

_S_a_m_p_l_i_n_g _T_i_m_e_s _o_f _T_i_m_e-_S_e_r_i_e_s

     time(x, offset=0)
     start(x)
     end(x)
     frequency(x)
     tsp(x)
     tsp(x) <- value

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

       x: a time-series.

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

     `time', `start', `end' and `frequency' are generic
     functions with a `default' and a `ts' method (see
     `methods').  `tsp(x)' returns
     `c(start(x),end(x),frequency(x))'.

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

     `time' creates the vector of times at which a time
     series was sampled.  `offset' can be used to indicate
     when sampling took place in the time unit.  `0' indi-
     cates the start of the unit, `0.5' the middle and `1'
     the end of the interval.

     `start' and `end' extract the times the first and last
     observations were taken and `frequency' returns the
     number of samples per unit time.

     `tsp(x)' returns the vector
     `c(start(x),end(x),frequency(x))'.  It is included for
     compatibility with the S language.  In the assignment
     form, `value' must be a numeric of length 3 or `NULL'
     which removes the `"tsp"' attribute and the `"ts"'
     class of `x'.

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

     `ts', `window' and `system.time' for CPU usage.

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

     data(presidents)
     # a simple series plot
     plot(c(time(presidents)), c(presidents), type="l")

