Load Stan functions as a string
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
)A character string containing the requested Stan functions
Character vector of function names to load. Defaults to all functions.
Character string, the path to the Stan code. Defaults to the path to the Stan code in the primarycensored package.
Logical, whether to wrap the functions in a
functions{} block. Default is FALSE.
Logical, whether to write the output to a file. Default is FALSE.
Character string, the path to write the output file if write_to_file is TRUE. Defaults to "pcd_functions.stan".
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.
Tools for working with package Stan functions
pcd_stan_dist_id(),
pcd_stan_files(),
pcd_stan_function_deps(),
pcd_stan_functions(),
pcd_stan_path()