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'

