rowperm                package:permax                R Documentation

_G_e_n_e_r_a_t_e_s _r_a_n_d_o_m _p_e_r_m_u_t_a_t_i_o_n_s _w_i_t_h_i_n _r_o_w_s _o_f _a _m_a_t_r_i_x

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

     Given a matrix x, returns a copy of x with a separate random
     permutations applied within each row.

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

     rowperm(x)

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

       x: a numeric matrix A numeric matrix with each row containing
          the elements from the corresponding row of x permuted in a
          random order. 

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

      x <- matrix(1:12,3)
      x
     #     [,1] [,2] [,3] [,4] 
     #[1,]    1    4    7   10
     #[2,]    2    5    8   11
     #[3,]    3    6    9   12
       rowperm(x)
     #     [,1] [,2] [,3] [,4] 
     #[1,]   10    7    1    4
     #[2,]    8   11    2    5
     #[3,]    6   12    9    3

