time                  package:stats                  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 observation.

     '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, ...)
     ## Default S3 method:
     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.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

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

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

