replace                 package:base                 R Documentation

_R_e_p_l_a_c_e _V_a_l_u_e_s _i_n _a _V_e_c_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     'replace' replaces the values in 'x' with indexes given in 'list'
     by those given in 'values'. If necessary, the values in 'values'
     are recycled.

_U_s_a_g_e:

     replace(x, list, values)

_A_r_g_u_m_e_n_t_s:

       x: vector

    list: an index vector

  values: replacement values

_V_a_l_u_e:

     A vector with the values replaced.

_N_o_t_e:

     'x' is unchanged: remember to assign the result.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

