Create an example package with a Stan model inside.

stan_package_create(path = tempfile())

Arguments

path

Path to write the package. Must not already exist.

Value

NULL (invisibly). Called for its side effects.

Details

After creating the package, the next step is to configure it with stan_package_configure(). After that, install it as an ordinary R package to automatically compile the models.

Examples

if (identical(Sys.getenv("INSTANTIATE_EXAMPLES"), "true")) {
path <- tempfile()
stan_package_create(path = path)
list.files(path)
}