Skip to contents

Compilation is deliberately explicit and cached in R's per-user cache directory. Package installation and loading never install CmdStan or compile C++. fit_epikinetics() calls this function automatically when needed.

Usage

compile_epikinetics_model(
  force_recompile = FALSE,
  quiet = TRUE,
  cache_dir = getOption("epikinetics.cache_dir", tools::R_user_dir("epikinetics", which =
    "cache"))
)

Arguments

force_recompile

Recompile even when the current source has a cached executable.

quiet

Passed to cmdstanr::cmdstan_model().

cache_dir

Optional cache directory. The default is controlled by the epikinetics.cache_dir option and otherwise uses tools::R_user_dir().

Value

A CmdStanModel compiled with Stan threading enabled.