Install morie's optional dependencies (interactive helper)
Source:R/install_extras.R
morie_install_extras.Rdmorie'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 toFALSEfor 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(). DefaultNAhonours the package'sDepends/Imports/LinkingToonly – 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-devFedora/RHEL:
sudo dnf install libcurl-develmacOS: pre-installed (Apple's libcurl); or
brew install curlWindows: bundled with Rtools
libsodium (required for ChaCha20-Poly1305 + HKDF-SHA256)
Debian/Ubuntu:
sudo apt-get install libsodium-devFedora/RHEL:
sudo dnf install libsodium-develmacOS:
brew install libsodium
liboqs (optional, gates ML-KEM-768 + ML-DSA-65)
Debian/Ubuntu: build from source (not yet packaged); https://github.com/open-quantum-safe/liboqs
Fedora/RHEL:
sudo dnf install liboqs-devel(recent releases)macOS:
brew install liboqs
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"))
} # }