is_loaded: Is the input a symbol in a loaded DLL?

View source: R/is-code.R

assert_is_loadedR Documentation

Is the input a symbol in a loaded DLL?

Description

Checks to see if the input DLL (a.k.a. shared object) is loaded.

Usage

assert_is_loaded(x, severity = getOption("assertive.severity", "stop"))

is_loaded(
  x,
  PACKAGE = "",
  type = c("", "C", "Fortran", "Call", "External"),
  .xname = get_name_in_parent(x)
)

Arguments

x

A string naming the symbol in a DLL to check.

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

PACKAGE

A string naming an R package to restrict the search to, or "" to check all packages. Passed to is.loaded.

type

A string naming the type of external code call to restrict the search to, or "" to check all type. Passed to is.loaded.

.xname

Not intended to be used directly.

Value

is_loaded wraps is.loaded, providing more information on failure. assert_is_loaded returns nothing but throws an error if is_loaded returns FALSE

Note

From R 4.4.0, DLL for base packages are not searchable, so is.loaded returns FALSE, so is_loaded also returns FALSE.

See Also

is.loaded.


assertive.code documentation built on May 31, 2023, 5:35 p.m.