check_package function

Check Package

Check Package

Check that a package is available.

check_package(pkg, msg = NULL, call. = FALSE)

Arguments

  • pkg: 'character' string. Package name.
  • msg: 'character' string. Action package is used for.
  • call.: 'logical' flag. Whether the function should be part of the error message.

Returns

Stops execution if the package is missing from the name space.

Examples

check_package(pkg = "inldata", msg = "Dataset access")

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center