

time {base}                                  R Documentation

_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

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

     `time' creates the vector of times at which a time
     series was sampled.

     `cycle' gives the positions in the cycle of each obser-
     vation.

     `frequency' returns the number of samples per unit time
     and `deltat' the time interval between observations
     (see `ts').

_U_s_a_g_e_:

     time(x, offset=0, ...)
     cycle(x, ...)
     frequency(x, ...)
     deltat(x, ...)

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

       x: a univariate or multivariate time-series, or a
          vector or matrix.

  offset: can be used to indicate when sampling took place
          in the time unit. `0' (the default) indicates the
          start of the unit, `0.5' the middle and `1' the
          end of the interval.

     ...: extra arguments for future methods.

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

     These are all generic functions, which will use the
     `tsp' attribute of `x' if it exists. `time' and `cycle'
     have methods for class `ts' that coerce the result to
     that class.

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

     `ts', `start', `tsp', `window'.

     `date' for clock time, `system.time' for CPU usage.

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

     data(presidents)
     cycle(presidents)
     # a simple series plot: c() makes the x and y arguments into vectors
     plot(c(time(presidents)), c(presidents), type="l")

