stan_package_model {instantiate} | R Documentation |
Get the cmdstanr
model object for a pre-compiled Stan
model inside a package.
stan_package_model(
name,
package,
library = NULL,
cmdstan_install = Sys.getenv("CMDSTAN_INSTALL", unset = ""),
compile = FALSE,
...
)
name |
Character of length 1, base name of the Stan model file
(without the containing directory or |
package |
Character of length 1, name of the R package to look for the built-in Stan model. |
library |
Character of length 1 or |
cmdstan_install |
Character of length 1, how to look for an installed copy of CmdStan. See https://wlandau.github.io/instantiate/ for details. Choices:
|
compile |
|
... |
Named arguments passed via |
Packages configured with instantiate
compile their Stan
models on installation. Then the stan_package_model()
function
retrieves the cmdstanr::cmdstan_model()
object without needing
to re-compile the model. Please see the documentation website
of the instantiate
package for examples.
An R6
Stan model object from the cmdstanr
package.
Please visit the documentation website at https://mc-stan.org/cmdstanr/
for detailed information on the composition of this model object
and how to use it to conduct Bayesian inference.
# Please see the documentation website of the {instantiate} package
# for examples.