Skip to contents

morie's Suggests: list spans ~50 R packages (causal/ML/spatial/IO families). CRAN policy requires us to leave their install to the user (no install.packages() at load time, no user-home writes). This helper resolves which Suggests are missing and (with user confirmation) installs them, plus prints platform-specific install hints for the system libraries morie's C/C++ backends use (libcurl, libsodium, optional liboqs).

Usage

morie_install_extras(
  which = "missing",
  ask = interactive(),
  repos = NULL,
  dependencies = NA,
  ...
)

Arguments

which

Either "missing" (install only missing Suggests – the default), "all" (install/upgrade every Suggests), or a character vector of specific package names.

ask

Logical. If TRUE (default), prompt the user before installing. Set to FALSE for non-interactive CI workflows.

repos

The CRAN-like repository URL(s) to install from. Default uses getOption("repos"), falling back to the RStudio CRAN mirror.

dependencies

Passed through to utils::install.packages(). Default NA honours the package's Depends/Imports/LinkingTo only – not the optional Suggests-of-Suggests cascade.

...

Extra args forwarded to utils::install.packages().

Value

Invisibly: a list with installed (character of packages added this call), already_present (already installed), failed (failed to install), and system_libs (named logical of detected system libraries).

System libraries

morie's compiled backends need three C libraries available at build time. Two are typically pre-installed on developer machines; one is optional and gates the post-quantum cryptography family. Install BEFORE installing/upgrading morie so the configure-time probes pick them up.

  • libcurl (required for HTTP fetchers)

    • Debian/Ubuntu: sudo apt-get install libcurl4-openssl-dev

    • Fedora/RHEL: sudo dnf install libcurl-devel

    • macOS: pre-installed (Apple's libcurl); or brew install curl

    • Windows: bundled with Rtools

  • libsodium (required for ChaCha20-Poly1305 + HKDF-SHA256)

    • Debian/Ubuntu: sudo apt-get install libsodium-dev

    • Fedora/RHEL: sudo dnf install libsodium-devel

    • macOS: brew install libsodium

  • liboqs (optional, gates ML-KEM-768 + ML-DSA-65)

Examples

if (FALSE) { # \dontrun{
  # Interactive: install whichever Suggests are missing
  morie_install_extras()

  # CI / scripted: install all, no prompt
  morie_install_extras(which = "all", ask = FALSE)

  # Just one family
  morie_install_extras(which = c("hawkes", "sf", "spdep"))
} # }