Write copies of the .stan files of a Stan model and its #include files with all profiling statements removed.
Source:R/model-tools.R
write_stan_files_no_profile.Rd
Write copies of the .stan files of a Stan model and its #include files with all profiling statements removed.
Usage
write_stan_files_no_profile(
stan_file,
include_paths = NULL,
target_dir = epinowcast::enw_get_cache()
)
Arguments
- stan_file
The path to a .stan file containing a Stan program.
- include_paths
Paths to directories where Stan should look for files specified in #include directives in the Stan program.
- target_dir
The path to a directory in which the manipulated .stan files without profiling statements should be stored. To avoid overriding of the original .stan files, this should be different from the directory of the original model and the
include_paths
.
Value
A list
containing the path to the .stan file without profiling
statements and the include_paths for the included .stan files without
profiling statements
See also
Functions used to help convert models into the format required for stan
enw_formula_as_data_list()
,
enw_get_cache()
,
enw_model()
,
enw_priors_as_data_list()
,
enw_replace_priors()
,
enw_sample()
,
enw_set_cache()
,
enw_stan_to_r()
,
enw_unset_cache()
,
remove_profiling()