colMax                 package:xcms                 R Documentation

_F_i_n_d _r_o_w _a_n_d _c_o_l_u_m_n _m_a_x_i_m_u_m _v_a_l_u_e_s

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

     Find row and column maximum values for numeric arrays.

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

     colMax(x, na.rm = FALSE, dims = 1)
     rowMax(x, na.rm = FALSE, dims = 1)
     which.colMax(x, na.rm = FALSE, dims = 1)
     which.rowMax(x, na.rm = FALSE, dims = 1)

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

       x: an array of two or more dimensions, containing numeric values 

   na.rm: logical. Should missing values (including 'NaN') be omitted
          from the calculations? (not currently implemented) 

    dims: Which dimensions are regarded as "rows" or "columns" to
          maximize. For 'rowMax', the maximum is over dimensions
          'dims+1, ...'; for 'colMax' it is over dimensions '1:dims'. 

_D_e_t_a_i_l_s:

     These functions are designed to act like the 'colSums' series of
     functions except that they only currently handle real arrays and
     will not  remove 'NA' values.

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

     A numeric array of suitable size, or a vector if the result is
     one-dimensional. The 'dimnames' (or 'names' for a vector result)
     are taken from the original array.

     For the 'which.*' functions, an integer array of suitable size, or
     a vector if the result is one-dimensional. The indecies returned
     are for accessing 'x' one-dimensionally (i.e. 'x[index]'). For
     'which.colMax()', the actual row indecies my be determined using
     '(which.colMax(x)-1) %% nrow(x) + 1'. For 'which.rowMax()', the
     actual column indecies may be determined using
     'ceiling(rowMax(x)/nrow(x))'.

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

     Colin A. Smith, csmith@scripps.edu

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

     'colSums'

