Learn R Programming

lintr (version 3.1.2)

missing_package_linter: Missing package linter

Description

Check for missing packages in library(), require(), loadNamespace(), and requireNamespace() calls.

Usage

missing_package_linter()

Arguments

Tags

common_mistakes, robustness

See Also

linters for a complete list of linters available in lintr.

Examples

Run this code
# will produce lints
lint(
  text = "library(xyzxyz)",
  linters = missing_package_linter()
)

# okay
lint(
  text = "library(stats)",
  linters = missing_package_linter()
)

Run the code above in your browser using DataLab