tfwindow               package:tframe               R Documentation

_T_r_u_n_c_a_t_e _a _T_i_m_e _S_e_r_i_e_s

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

     Truncate a time series object to a time window.

_U_s_a_g_e:

         tfwindow(x, ...)
         tfwindow(x, start.=NULL, end.=NULL, tf=NULL, warn=T)
         tfwindow(x, start.=NULL, end.=NULL, warn=T, eps=.Options$ts.eps)


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

       x: A time series object.

  start.: A start date of a format compatible with the time series

    end.: An end date of a format compatible with the time series

      tf: A tframe or tframed object

    warn: A logical indicating if warning should be produced

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

     If `start.' or `end.' are omitted and `tf' is specified then the
     start or end is taken from the `tf' object. This function calls
     window but makes more effort to preserve `series.names' if the `x'
     has them.  It also supports the optional argument `warn' to
     suppress warning messages. Frequently it is convenient to write
     code which always  truncates to a window without first checking if
     the data is already within  the window. Since window produces a
     warning in this situation, the optional  argument is frequently
     useful when tfwindow is used by other code.

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

     A time series object similar to x, but typically spanning a
     shorter time period.

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

     tfwindow(ts(matrix(rnorm(24),24,1), start=c(1980,1), frequency=4), 
         start=c(1982,2))

