get_pat_pos | R Documentation |
Given a search pattern and given a file that is specified
by its complete path, the positions where the search
pattern occurs is returned. Positions correspond to
vector indices when the content of the file is read
using the function readLines
. These vector indices
are equivalent to line numbers of the text. In case
when the search pattern is not found, NA is returned.
get_pat_pos(ps_file, ps_pattern)
ps_file |
name of the file to search for pattern |
ps_pattern |
search pattern for which we search in the file |
vec_pos_found vector of positions where pattern occurs, NA if pattern was not found
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.