Description Usage Arguments Value Examples
find_pattern
search a pattern in all files from a directory and is_on_file
search
for a pattern in one file.
1 2 3 | find_pattern(pattern, where = here(), full_names = FALSE)
is_in_file(pattern, file)
|
pattern |
the pattern to find. Can be regex |
where |
the path to the directory where you want to search |
full_names |
a logical value as in |
file |
the path to the file where you want to search |
a vector with all the files where the pattern was found for find_pattern
or a logical value for is_on_file
1 2 3 4 5 6 7 | find_pattern(pattern = "usethis::", where = system.file(package = "benutils"))
## Not run:
# if you are in a R project you can just specify the pattern
find_pattern("my_pattern")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.