R/stan_package_clean.R
stan_package_clean.Rd
Remove one or more compiled Stan models from the file system of an R package.
stan_package_clean(models = instantiate::stan_package_model_files())
NULL
(invisibly). Called for its side effects.
Other packages:
stan_cmdstan_path()
,
stan_package_compile()
,
stan_package_configure()
,
stan_package_model_files()
if (identical(Sys.getenv("INSTANTIATE_EXAMPLES"), "true")) {
path <- tempfile()
stan_package_create(path = path)
stan_package_configure(path = path)
models <- stan_package_model_files(path)
list.files(file.path(path, "inst", "stan"))
stan_package_compile(models)
list.files(file.path(path, "inst", "stan"))
# Clean up the compiled Stan model files:
stan_package_clean(models = models)
list.files(file.path(path, "inst", "stan"))
}