Description Usage Arguments Details Value Examples
Recursive call to grep in R
1 2 3 4 5 6 7 8 9 10 |
pattern |
character, string containing a regular expression |
path |
character, path to search, see details |
recursive |
boolean, Should the listing recurse into directories? passed to list.files, Default: FALSE |
... |
arguments passed to grep |
whole_word |
boolean, if TRUE then the pattern will be wrapped with \bpattern\b internally, Default: FALSE |
padding |
integer, number of rows to return in addition to the query line, Default: 5 |
use_crayon |
boolean, use crayon colors in console output, Default: TRUE |
marker |
boolean, use rstudioapi marker, Default: interactive() |
if path is a character then the pattern is checked against a location on the local machine, if path is a list with arguments containing params for ls_remote then the pattern is checked on the specified remote repository (repository must be public). In this case of the recursive parameter takes over-rides over the list parameter.
grepr(value = FALSE) returns a vector of the indices of the elements of x that yielded a match (or not, for invert = TRUE. This will be an integer vector unless the input is a long vector, when it will be a double vector. grepr(value = TRUE) returns a character vector containing the selected elements of x (after coercion, preserving names but no other attributes).
1 2 3 4 5 6 7 8 9 10 | grepr(pattern = 'gsub',path = '.',value=TRUE,recursive = TRUE)
thisrepo='metrumresearchgroup/vcs'
remotepath=list(path=thisrepo,subdir='R',vcs='github')
grepr(pattern = 'importFrom',path = remotepath)
grepr(pattern = 'importFrom',path = remotepath,value=TRUE)
grepr(pattern = 'importFrom',path = remotepath,value=TRUE,padding=3)
grepr(pattern = 'tags$script',
path = list(path = 'timelyportfolio/vueR',subdir='R|inst',vcs='github',PAT = Sys.getenv('GITHUB_PAT')),
padding=3,value=TRUE,fixed=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.