Skip to contents

For each term in pattern_vector, runs find_in_files() and reports both how many files contain the term and how many matching lines were found overall.

Usage

found_in_N_files_T_times(
  pattern_vector,
  path = "./R",
  ignorecomments = TRUE,
  ...
)

Arguments

pattern_vector

character vector of search terms

path

optional path like "./R"

ignorecomments

if TRUE, ignore matches in lines that are just comments rather than active source code

...

passed to find_in_files() such as ignore.case or filename_pattern

Value

Data frame with columns term, nfiles, and nhits.

Examples

EJAM:::found_in_N_files_T_times(c("gray", "grey"), path = "./R", quiet = TRUE)