medianFilter              package:xcms              R Documentation

_A_p_p_l_y _a _m_e_d_i_a_n _f_i_l_t_e_r _t_o _a _m_a_t_r_i_x

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

     For each element in a matix, replace it with the median of the
     values around it.

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

     medianFilter(x, mrad, nrad)

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

       x: numeric matrix to median filter

    mrad: number of rows on either side of the value to use for median
          calculation 

    nrad: number of rows on either side of the value to use for median
          calculation 

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

     A matrix whose values have been median filtered

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

     Colin A. Smith, csmith@scripps.edu

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

     mat <- matrix(1:25, nrow=5)
     mat
     medianFilter(mat, 1, 1)

