This is a code linting function and expected to be called at the console
during package development. It will scan the files in the current project and
replace unqualified references to e.g. mutate
with ones to dplyr::mutate
etc. All changes are made after a commit whcih can be reverted.
Usage
fix_unqualified_fns_bulk(
pkg = ".",
rDirectories = c(here::here("R"), here::here("tests/testthat")),
prioritise = c("dplyr", "rlang", "stringr", "forcats", "ggplot2", "purrr", "tidyr",
"readr", "stats", "utils")
)
Arguments
- pkg
the package
- rDirectories
the locations of the R code to fix (by default R scripts,
tests, but not data-raw or vignettes)
- prioritise
a list of package names to pick from first
Value
nothing. called for side effects.