earliestEnd              package:tframe              R Documentation

_S_t_a_r_t _a_n_d _E_n_d _f_o_r _O_b_j_e_c_t_s _w_i_t_h _M_u_l_t_i_p_l_e _T_i_m_e _S_e_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Return start or end date (or index of the object) from multiple
     time series objects.

_U_s_a_g_e:

         earliestEnd(x, ...)
         earliestEndIndex(x, ...)
         ## Default S3 method:
         earliestEndIndex(x, ...)
         ## S3 method for class 'tframe':
         earliestEndIndex(x, ...)

         earliestStart(x, ...)
         earliestStartIndex(x, ...)
         ## Default S3 method:
         earliestStartIndex(x, ...)
         ## S3 method for class 'tframe':
         earliestStartIndex(x, ...)

         latestEnd(x, ...)
         latestEndIndex(x, ...)
         ## Default S3 method:
         latestEndIndex(x, ...)
         ## S3 method for class 'tframe':
         latestEndIndex(x, ...)

         latestStart(x, ...)
         latestStartIndex(x, ...)
         ## Default S3 method:
         latestStartIndex(x, ...)
         ## S3 method for class 'tframe':
         latestStartIndex(x, ...)

_A_r_g_u_m_e_n_t_s:

       x: A tframe or tframed object.

     ...: Additional tframe or tframed objects.

_D_e_t_a_i_l_s:

     These functions calculate the start and end of each object in the
     argument and return a result by  comparing across objects. Thus,
     latestStart returns the start date of the object which starts
     latest and latestStartIndex returns the  corresponding index of
     the object in the argument list.

_V_a_l_u_e:

     A date or index.

_S_e_e _A_l_s_o:

     'tframe' 'tfwindow' 'tfTruncate' 'trimNA'

_E_x_a_m_p_l_e_s:

         t1<-ts(c(1,2,3,4,5), start=c(1991,1))
         t2<-ts(c(2,3,4,5,6,7,8), start=c(1992,1))
         t3<-ts(c(NA,2,3,4,5), start=c(1991,1))

         latestStart(t1,t2,t3)  # 1992 1 corresponding to the starting date of 
                                 # the object which starts latest (t2)
         latestStart(t1,t3)     # both start in 1991 1 (NAs count as data)
         latestStart(tbind(t1,t2,t3)) # tbind gives a single object starting in 1991 1
         latestStart(t2, tbind(t1,t2,t3))

         latestStartIndex(t1,t2,t3)  # position of t2 in the argument list

