regroup              package:LearnBayes              R Documentation

_C_o_l_l_a_p_s_e_s _a _m_a_t_r_i_x _b_y _s_u_m_m_i_n_g _o_v_e_r _r_o_w_s

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

     Collapses a matrix by summing over a specific number of rows

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

     regroup(data,g)

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

    data: a matrix

       g: a positive integer beween 1 and the number of rows of data

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

     reduced matrix found by summing over rows

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

     Jim Albert

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

     data=matrix(c(1:20),nrow=4,ncol=5)
     g=2
     regroup(data,2)

