powered by
Locate indices of the pattern in the string
UFA_locate_regex(string, pattern, ignore.case = FALSE, perl = FALSE, fixed = FALSE, useBytes = FALSE)
A 2-column matrix of location indices. The first and second columns represent start and end positions, respectively.
a string as character
a pattern to screen
ignore.case
perl
fixed
useBytes
This function returns `NULL` when no matches are detected for the pattern.
pattern <- "Cl" string <- "NaCl.5HCl" Location_Cl <- UFA_locate_regex(string, pattern)
Run the code above in your browser using DataLab