multiGrep                package:maDB                R Documentation

_P_e_r_f_o_r_m _a _p_a_t_t_e_r_n _s_e_a_r_c_h _w_i_t_h _a _l_i_s_t _o_f _p_a_t_t_e_r_n_s

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

     'multiGrep' This function can be used, if one wants to know the
     position of a list of patterns inside a vector.

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

     multiGrep(pattern,x,...)

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

 pattern: The string, or a vector of strings that should be searched in
          the submitted data.

       x: The data, any kind of string or vector.

     ...: Some additional parameters for the 'myGrep' and 'grep'
          commands that are executed inside the function.

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

     The functions performs a 'myGrep' call for each of the patterns
     submitted and returns a vector with the indizes where the patterns
     where found inside the data vector.

_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:

     'grep', 'myGrep'

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

     test <- c("where","is","the","pattern","in","this","vector","?")
     multiGrep(pattern="patt",test)
     test[multiGrep(pattern="patt",test)]

     multiGrep(pattern=c("the","tor","is","where"),test)
     test[multiGrep(pattern=c("the","tor","is","where"),test)]

