search_dir: Search a Directory of R Files for a Pattern Looks through all...

Description Usage Arguments Value Examples

View source: R/misc_tools.R

Description

Search a Directory of R Files for a Pattern Looks through all of the .R files in a directory for a given pattern in the code.

Usage

1
search_dir(.dir, pattern, as_list = FALSE, drop_null = TRUE, ...)

Arguments

.dir

character. The path to the directory containing the files to search.

pattern

characte. The pattern, in RegExp format, for which to search the files.

as_list

logical. Should search_dir return a list instead of a data frame?

drop_null

logical. Drop the NULL values? Only applies when as_list is TRUE.

...

pass through additional options.

Value

a data frame containing the filename, line number, and code line text for any lines of code matching the pattern.

Examples

1
search_dir("./", "read.csv")

burch-cm/kittius documentation built on March 11, 2021, 5:40 a.m.