itsJoin                 package:its                 R Documentation

_J_o_i_n _F_u_n_c_t_i_o_n_s _f_o_r _I_r_r_e_g_u_l_a_r _T_i_m_e-_S_e_r_i_e_s _O_b_j_e_c_t_s

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

     Join functions for objects of class '"its"'.

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

     union(x,y)
     intersect(x,y)
     alignedIts(obj1,obj2,print=FALSE)
     appendIts(obj1,obj2,but=TRUE,matchnames=TRUE)
     collapseIts(x)

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

    x, y: an object of class '"its"' or NULL

obj1,obj2: object of class '"its"'

   print: logical flag to display summary information

     but: logical flag controls whether overlap is disallowed

matchnames: logical flag controls whether names must match

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

     'union' has a number of time values (rows) which is determined by
     the union of the time-stamps of the two inputs.  The number of
     columns is the sum of the number of columns of the two inputs.

     'intersect' has a number of time values (rows) which is determined
     by the intersect of the time-stamps of the two inputs.  The number
     of columns is the sum of the number of columns of the two inputs.

     'alignedIts' selects the rows from two inputs which have identical
     time-stamps.

     'appendIts' appends one object to the other, removing overlapping
     data from the later object, optionally checking that the column
     names match.  Overlapping data must match.

     'collapseIts' checks for columns with the same names, using
     dimnames(x)[[2]]. columns with the same names are required to have
     the same numeric values in each row, but are allowed NAs.  The
     numeric data is combined, and the resulting object has unique
     column names - this will in general result in a reduction in the
     number of columns.

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

     For 'union', 'intersect', 'appendIts' an object of class '"its"'.

     For 'alignedIts', a list of two objects of class '"its"'

_A_u_t_h_o_r(_s):

     Giles Heywood

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

     'ts', 'POSIXct', 'itsFile', 'itsLags', 'itsJoin', 'itsTimes',
     'itsSubset', 'itsFin', 'itsDisp', 'itsInfo', 'itsCumdif',
     'itsArith'

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

     its.format("%Y-%m-%d")
     b <- newIts(1:30,ncol=3,start="2003-01-01",end="2003-01-10")
     union(b,diff(b))
     intersect(b,diff(b))
     alignedIts(b,diff(b))
     b1 <- newIts(1:30,ncol=3,start="2003-01-11",end="2003-01-20")
     appendIts(b,b1)
     c <- union(b,b*NA)
     c[2,4] <- 99
     c[2,1] <- NA
     print(c)
     collapseIts(c)

