search_raw: Search for files matching raw text search

Description Usage Arguments See Also Examples

View source: R/code_library.R

Description

Search for files matching raw text search

Usage

1
search_raw(files, text, search_title = TRUE, search_contents = TRUE)

Arguments

files

vector string of file names/paths

text

string (can be regex) to search for

search_title

logical (default=TRUE). should matching occur in title

search_contents

logical (default=TRUE). should matching occur in file contents

See Also

ls_scripts, ls_code_library, stage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

ls_scripts("Scripts") %>% search_raw("AUC")  ## finds all scripts containing string "AUC"

## regex match find instances of AUC() function being used
ls_scripts("Scripts") %>% search_raw("AUC\\(")

## bring file(s) into staging area of project
ls_scripts("Scripts") %>% search_raw("AUC\\(") %>% stage()


## End(Not run)

tsahota/TidyProject documentation built on April 19, 2021, 9:14 p.m.