apply                 package:FLCore                 R Documentation

_M_e_t_h_o_d _a_p_p_l_y

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

     Functions can be applied to margins of an FLQuant array using this
     method. In contrast  with the standard method, dimensions are not
     collapsed in the output object.

     'FUN' in the case of an 'FLQuant' must collapse at least one
     dimension when applied over an array.

     For further details see apply.

_G_e_n_e_r_i_c _f_u_n_c_t_i_o_n:

     apply(X,MARGIN,FUN)

_M_e_t_h_o_d _a_r_g_u_m_e_n_t_s:


     '_X' : an object of a class for which this method has been defined.

     '_M_A_R_G_I_N' : a vector giving the subscripts which the function will
          be applied over. 1 indicates rows, 2 indicates columns,
          c(1,2) indicates rows and columns, etc.

     '_F_U_N' : the function to be applied.

     '...' : optional arguments to FUN.

_M_e_t_h_o_d_s:


      _s_i_g_n_a_t_u_r_e(_X=_A_N_Y,_M_A_R_G_I_N=_m_i_s_s_i_n_g,_F_U_N=_m_i_s_s_i_n_g) : New S4 generic
          based on base::apply

      _s_i_g_n_a_t_u_r_e(_X=_F_L_Q_u_a_n_t,_M_A_R_G_I_N=_n_u_m_e_r_i_c,_F_U_N=_f_u_n_c_t_i_o_n) : apply a given
          function over the selected dimensions of an FLQuant-class.
          Returns an object of class FLQuant-class.

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

     The FLR Team

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

     apply

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

     flq <- FLQuant(rlnorm(100), dim=c(10,20,1,1,1,5))
     apply(flq, 1, sum)
     apply(flq, 2:6, sum)

