Check that imported packages are actually used
Source:R/unused_import_linter.R
unused_import_linter.Rd
Check that imported packages are actually used
Usage
unused_import_linter(
allow_ns_usage = FALSE,
except_packages = c("bit64", "data.table", "tidyverse")
)
Arguments
- allow_ns_usage
Suppress lints for packages only used via namespace. This is
FALSE
by default becausepkg::fun()
doesn't requirelibrary(pkg)
. You can use requireNamespace("pkg") to ensure a package is installed without loading it.- except_packages
Character vector of packages that are ignored. These are usually attached for their side effects.
See also
linters for a complete list of linters available in lintr.