This function ensures specific Stan interfaces are installed, configured, and loaded. It handles package installation (from R-multiverse/CRAN (stable) or Stan universe (dev)) and performs necessary one-time setup (like installing CmdStan).
Arguments
- interface
A character vector. Select at least one of: "brms", "cmdstanr", "rstan", "rstanarm".
- cores
Integer. Number of cores to use. Defaults to
getOption("mc.cores"). You must setoptions(mc.cores = ...)or passcoresexplicitly.- quiet
Logical. If
TRUE, suppresses status messages.- force
Logical. If
TRUE, allows installation in non-interactive sessions.- reinstall
Logical. If
TRUE, forces re-installation.- check_updates
Logical. If
TRUE, checks for CmdStan updates.- dev
Logical. If
FALSE(default), installs stable releases from R-multiverse or CRAN. IfTRUE, installs development versions from Stan R-universe.- brms_backend
Character. The
brmsbackend to use. Defaults togetOption("brms.backend", "cmdstanr")and must be one ofc("cmdstanr", "rstan").- rstan_auto_write
Logical. If
TRUE, setsrstan::rstan_options(auto_write = TRUE))