Check for allowed or disallowed package dependencies within a project or directory
check_pkgs.RdCheck for allowed or disallowed package dependencies within a project or directory
Usage
installed_pkgs()
missing_pkgs(
dir = here::here(),
glob = "*.R$|*.r$|*.Rmd$|*.rmd$|*.Rnw$|*.rnw|*.Qmd|*.qmd$",
recurse = TRUE
)
install_missing_pkgs(
dir = here::here(),
glob = "*.R$|*.r$|*.Rmd$|*.rmd$|*.Rnw$|*.rnw|*.Qmd|*.qmd$",
recurse = TRUE,
...
)
find_pkgs(
dir = here::here(),
glob = "*.R$|*.r$|*.Rmd$|*.rmd$|*.Rnw$|*.rnw|*.Qmd|*.qmd$",
full = FALSE,
recurse = TRUE
)
check_allowed_pkgs(
pkgs,
dir = here::here(),
glob = "*.R$|*.r$|*.Rmd$|*.rmd$|*.Rnw$|*.rnw|*.Qmd|*.qmd$",
full = FALSE,
recurse = TRUE
)
check_disallowed_pkgs(
pkgs,
dir = here::here(),
glob = "*.R$|*.r$|*.Rmd$|*.rmd$|*.Rnw$|*.rnw|*.Qmd|*.qmd$",
full = FALSE,
recurse = TRUE
)
check_required_pkgs(
pkgs,
dir = here::here(),
glob = "*.R$|*.r$|*.Rmd$|*.rmd$|*.Rnw$|*.rnw|*.Qmd|*.qmd$",
full = FALSE,
recurse = TRUE
)Arguments
- dir
Directory to search.
- glob
File types to search for, defaults to
R,Rmd, andRnwfiles.- recurse
Should directory be recursively explored (i.e. match files in sub directories)
- ...
Additional arguments passed to
install.packages().- full
Should the full data frame of dependencies be returned or just a vector of package names.
- pkgs
Character vector of package names
Functions
installed_pkgs(): Returns a vector of installed packages.missing_pkgs(): Returns a vector of packages found byfind_pkgsthat are not currently installed.install_missing_pkgs(): Installs missing packages found bymissing_pkgs.find_pkgs(): Find all of the packages used within a project using renv.check_allowed_pkgs(): Check that only the allowed packages are usedcheck_disallowed_pkgs(): Check if any disallowed packages are usedcheck_required_pkgs(): Check that the required packages are used