impute                 package:e1071                 R Documentation

_R_e_p_l_a_c_e _M_i_s_s_i_n_g _V_a_l_u_e_s

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

     Replaces missing values of a matrix or dataframe with the medians
     ('what="median"') or means ('what="mean"') of the respective
     columns.

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

     impute(x, what = c("median", "mean"))

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

       x: A matrix or dataframe.

    what: What to impute.

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

     A matrix or dataframe.

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

     Friedrich Leisch

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

     x<- matrix(1:10, ncol=2)
     x[c(1,3,7)] <- NA
     print(x)
     print(impute(x))

