Skip to contents

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 because pkg::fun() doesn't require library(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.