grep_count: Efficiently count the number of relevant records from one or more files using grep
grep_count(
files = NULL,
path = NULL,
file_pattern = NULL,
pattern = "",
invert = FALSE,
ignore_case = FALSE,
fixed = FALSE,
recursive = FALSE,
word_match = FALSE,
only_matching = FALSE,
skip = 0,
header = TRUE,
include_filename = FALSE,
show_cmd = FALSE,
show_progress = FALSE,
...
)A data.table containing file names and counts.
Character vector of file paths to read.
Optional. Directory path to search for files.
Optional. A pattern to filter filenames when using the
path argument. Passed to list.files.
Pattern to search for within files (passed to grep).
Logical; if TRUE, return non-matching lines.
Logical; if TRUE, perform case-insensitive matching (default: TRUE).
Logical; if TRUE, pattern is a fixed string, not a regular expression.
Logical; if TRUE, search recursively through directories.
Logical; if TRUE, match only whole words.
Logical; if TRUE, return only the matching part of the lines.
Integer; number of rows to skip.
Logical; if TRUE, treat first row as header.
Logical; if TRUE, include source filename as a column.
Logical; if TRUE, return the grep command string instead of executing it.
Logical; if TRUE, show progress indicators.
Additional arguments passed to fread.