sweep                 package:FLCore                 R Documentation

_S_w_e_e_p _o_u_t _F_L_Q_u_a_n_t _S_u_m_m_a_r_i_e_s

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

     Return an 'FLQuant' obtained from an input 'FLQuant' by sweeping
     out a summary statistic along the selected dimensions.

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

     An FLQuant with the same shape as 'x', but with the summary
     statistics swept out.

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

     sweep(x, MARGIN, STATS, FUN="-", check.margin=TRUE, ...)

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


     _x an FLQuant.

     _M_A_R_G_I_N a vector of indices giving the extents of 'x' which
          correspond to 'STATS'.

     _S_T_A_T_S the summary statistic which is to be swept out.

     _F_U_N the function to be used to carry out the sweep.  In the case
          of binary operators such as '"/"' etc., the function name
          must backquoted or quoted. ('FUN' is found by a call to
          'match.fun'.)

     _c_h_e_c_k._m_a_r_g_i_n logical.  If 'TRUE' (the default), warn if the length
          or dimensions of 'STATS' do not match the specified
          dimensions of 'x'.  Set to 'FALSE' for a small speed gain
          when you _know_ that dimensions match.

     ... optional arguments to 'FUN'.

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

     The FLR Team

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

     'sweep'

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

        data(ple4)
        mean.f <- apply(harvest(ple4),2,mean)
        scaled.f <- sweep(harvest(ple4),2,mean.f,"/")

