inlaAvailable: Check whether INLA is usable

View source: R/forInla.R

inlaAvailableR Documentation

Check whether INLA is usable

Description

Tests whether the INLA package is installed and its binaries work, and optionally sets INLA thread options.

Usage

inlaAvailable()
inlaSetThreads(num.threads = 2L)

Arguments

num.threads

Number of threads passed to INLA::inla.setOption.

Details

requireNamespace("INLA") can succeed even when the INLA program binaries are missing or broken. inlaAvailable additionally probes INLA::inla.getOption so examples and tests can skip safely. inlaSetThreads is a no-op when INLA is unavailable.

Value

inlaAvailable returns a logical. inlaSetThreads returns TRUE if options were set, FALSE otherwise, invisibly.

Examples

inlaAvailable()
inlaSetThreads(2)

geostatsp documentation built on Aug. 6, 2026, 3:02 a.m.