requireNamespaces: Require package namespaces

View source: R/requireNamespaces.R

requireNamespacesR Documentation

Require package namespaces

Description

Require package namespaces

Usage

requireNamespaces(packages)

Arguments

packages

character. Package names to load.

Details

This function intentionally does not attach packages, unlike library, require, or attachNamespace functions.

Intended for use inside package functions that relying upon optional dependencies defined via Suggests instead of Imports or Depends in DESCRIPTION file.

Unlike requireNamespace, this variant always errors on namespace failure.

Note

Updated 2023-02-07.

See Also

  • requireNamespace

  • attachNamespace

  • loadNamespace

Examples

requireNamespaces(c("base", "utils"))

acidgenomics/r-goalie documentation built on Jan. 12, 2024, 4:15 a.m.