protectMetachar            package:limma            R Documentation

_P_r_o_t_e_c_t _M_e_t_a_c_h_a_r_a_c_t_e_r_s

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

     Add backslashes before any metacharacters found in a string.

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

     protectMetachar(x)

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

       x: character vector

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

     This function is used to protect strings containing metacharacters
     so that the metacharacters can be treated as ordinary characters
     in string matching functions operations.

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

     A character vector of the same length as 'x' in which two
     backslashes have been inserted before any metacharacter.

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

     Gordon Smyth

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

     An overview of LIMMA functions for reading data is given in
     03.ReadingData.

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

     # without protectMetachar, this would be no match
     grep(protectMetachar("Ch1 (mean)"),"Ch1 (mean)")

