Skip to contents

Compiles the false-positive occupancy model the first time it is needed and keeps the executable in the user cache directory (tools::R_user_dir("crywolf", "cache")), so later sessions load it without recompiling. fp_occu() calls this function itself; call it directly to compile ahead of time, for example before launching parallel workers in fp_calibrate().

Usage

fp_compile(force = FALSE, quiet = TRUE)

Arguments

force

Logical. Recompile even if a current executable exists.

quiet

Logical. Suppress compiler output.

Value

A CmdStanModel object (invisibly).

Details

The model is compiled with threading enabled (stan_threads), so that fp_occu() can split the likelihood of each chain among several threads (argument threads_per_chain).

Examples

if (FALSE) { # \dontrun{
fp_compile()
} # }