replaceAll               package:maDB               R Documentation

_R_e_p_l_a_c_e _a_l_l _o_c_c_u_r_e_n_c_e_s _o_f _a _s_p_e_c_i_f_i_e_d _c_h_a_r_a_c_t_e_r _i_n _a _s_t_r_i_n_g _b_y _a _n_e_w _c_h_a_r_a_c_t_e_r

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

     'replaceAll' This function helps to replace characters in a string
     or vector of strings.

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

     replaceAll(x,old,new)

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

       x: The string or vector of strings where the replacements should
          occurr.

     old: The character or vector of characters that should be
          replaced.

     new: The character or vector of characters with whom the old
          characters should be replaced.

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

     This function replaces single characters with others.

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

     Johannes Rainer

_R_e_f_e_r_e_n_c_e_s:

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

     'replaces'

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

     test <- c("zes","i have","an american","kezboard lazout")
     replaceAll(test,old="z","y")
     replaceAll(test,old=c("z","h"),new=c("y","d"))

