fapply                  package:far                  R Documentation

_A_p_p_l_y _f_u_n_c_t_i_o_n_s _o_v_e_r _a _f_d_a_t_a _o_b_j_e_c_t

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

     'fapply' returns a 'fdata' object of the same length as data. Each
     element of which is the result of applying 'FUN' to the
     corresponding element of data.

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

     fapply(data, FUN, row.names, ...)

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

    data: A 'fdata' object 

     FUN: the function to be applied. In the case of functions like +,
          %*%, etc., the function name must be quoted. 

row.names: a vector giving the names describing the results of 'FUN' 

     ...: optional arguments to 'FUN'. 

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

     This function has to be used only with 'fdata' objects, unless it
     stop, returning no value.

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

     The returned value is a 'fdata' object too.

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

     J. Damon

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

     'apply', 'lapply'.

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

       # Simulation of a FARX process
       data1 <- simul.farx(m=10,n=400,base=base.simul.far(20,5),
                     base.exo=base.simul.far(20,5),
                     d.a=matrix(c(0.5,0),nrow=1,ncol=2),
                     alpha.conj=matrix(c(0.2,0),nrow=1,ncol=2),
                     d.rho=diag(c(0.45,0.90,0.34,0.45)),
                     alpha=diag(c(0.5,0.23,0.018)),
                     d.rho.exo=diag(c(0.45,0.90,0.34,0.45)),
                     cst1=0.0)

       fapply(data1,sum)
       multplot(fapply(fapply(data1,abs),cumsum))

