Find Pattern in Files
Overview
Creates a HTML widget which displays the results of searching for a pattern in files in a given folder. The results can be viewed in the 'RStudio' viewer pane, included in a 'R Markdown' document or in a 'Shiny' application. Also provides a 'Shiny' application allowing to run this widget and to navigate in the files found by the search. Instead of creating a HTML widget, it is also possible to get the results of the search in a 'tibble'. The search is performed by the 'grep' command-line utility.
- Files without base name (such as
.gitignore) were excluded from the search.
This is no longer the case.
- Hidden folders (those whose name starts with a dot) were not excluded from
the search when running a full recursive search (i.e. depth is NULL or a
negative integer). Now they are always excluded.
- The argument
extof thefindInFilesfunction has been renamed to
extensions and it can be a vector of file extensions now.
- The arguments
excludePatternandexcludeFoldersPatternof the
findInFiles function can be some vectors now, to give multiple patterns.
- The
findInFilesfunction has now an argumentincludePattern. If a vector
of patterns is supplied to this argument, then only the files whose name matches
one of these patterns are included in the search.
Show all changes in 0.5.0Hide the rest of the changes in 0.5.0
- The
findInFilesfunction has two new argumentsmaxCountPerFileand
maxCount. If an integer is supplied to maxCountPerFile, then this integer
is passed to the --max-count option of the grep command and then grep
stops to search in a file whenever it has found maxCountPerFile results in
this file. If an integer is supplied to maxCount, then only the
first maxCount results found by grep are returned; but grep does not
stop to search after it has found maxCount results: it internally returns all
the search results, but only the first maxCount results are returned to the
user.
- The
findInFilesfunction has now an alias function namedfif. - Since I most often use the
findInFilesfunction to search in R files, I
added the function fifR which is the same as findInFiles with the
extensions argument set to "R".
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 5
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 80%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 0%
- Median days to close, 50 most recently updated closed issues
- 5
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/stla/findinfiles on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Dependencies
Code & Tests
People & History
Package metadata
- First published
- 2020-10-22
- Total releases
- 7 / 6 yrs
- License
- GPL-3 OSI
- Download size
- 35 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("findInFiles")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.