matmax, matmin, matsort       package:geometry       R Documentation

_R_o_w-_w_i_s_e _m_a_t_r_i_x _f_u_n_c_t_i_o_n_s

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

     Compute maximum or minimum of each row, or sort each row of a
     matrix, or a set of (equal length) vectors.

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

     matmax(...)
     matmin(...)
     matsort(...)
     matorder(...)

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

     ...: A numeric matrix or a set of numeric vectors (that are
          column-wise bind together into a matrix with 'cbind'). 

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

     'matmin' and 'matmax' return a vector of length
     'nrow(cbind(...))'. 'matsort' returns a matrix of dimension
     'dim(cbind(...))' with in each row of 'cbind(...)' sorted.
     'matsort(x)' is a lot faster than, e.g., `'t(apply(x,1,sort))'',
     if 'x' is tall (i.e., 'nrow(x)'>>'ncol(x)' and 'ncol(x)'<30. If
     'ncol(x)'>30 then 'matsort' simply calls `'t(apply(x,1,sort))''.
     'matorder' returns a permutation which rearranges its first
     argument into ascending order, breaking ties by further arguments.

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

     Raoul Grasman

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

     example(Unique)

