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.

fix_unqualified_fns_bulk(
  pkg = ".",
  rDirectories = c(here::here("R"), here::here("tests/testthat")),
  dry_run = FALSE,
  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, and tests, but not vignettes)

dry_run

by default this function will not actually do anything unless this is set to FALSE. However the dry run output can be manually compared with a diff tool to interactively accept changes.

prioritise

a list of package names to pick from first

Value

nothing. called for side effects.