[Stable] his function exposes internal stan functions in R from a user supplied list of target files. Allows for testing of stan functions in R and potentially user use in R code.

expose_stan_fns(files, target_dir, ...)

Arguments

files

A character vector indicating the target files

target_dir

A character string indicating the target directory for the file

...

Additional arguments passed to rstan::expose_stan_functions.

Examples

# \donttest{
expose_stan_fns("rt.stan", target_dir = system.file("stan/functions", package = "EpiNow2"))

# test by updating Rt
update_Rt(rep(1, 10), log(1.2), rep(0.1, 9), rep(10, 0), numeric(0), 0)
#>  [1] 1.200000 1.326205 1.465683 1.619831 1.790190 1.978466 2.186543 2.416503
#>  [9] 2.670649 2.951524
# }