Load Stan functions as a string
Usage
pcd_load_stan_functions(
functions = NULL,
stan_path = primarycensored::pcd_stan_path(),
wrap_in_block = FALSE,
write_to_file = FALSE,
output_file = "pcd_functions.stan",
dependencies = FALSE
)Arguments
- functions
Character vector of function names to load. Defaults to all functions.
- stan_path
Character string, the path to the Stan code. Defaults to the path to the Stan code in the primarycensored package.
- wrap_in_block
Logical, whether to wrap the functions in a
functions{}block. Default is FALSE.- write_to_file
Logical, whether to write the output to a file. Default is FALSE.
- output_file
Character string, the path to write the output file if write_to_file is TRUE. Defaults to "pcd_functions.stan".
- dependencies
Logical, whether to include all functions that the requested functions depend on. When TRUE, recursively finds and includes all dependencies in the correct order (dependencies before the functions that use them). Default is FALSE.
See also
Tools for working with package Stan functions
pcd_stan_dist_id(),
pcd_stan_files(),
pcd_stan_function_deps(),
pcd_stan_functions(),
pcd_stan_path()
