knit_engines_set_cache_stan | R Documentation |
This is a simple alternative to cmdstanr::register_knitr_engine()
.
Chunk code is not compiled, but just written to a file with decent caching
to facilitate showing the usage of cmdstanr::cmdstan_model()
.
knit_engines_set_cache_stan(cache_stan_prefix = NULL)
cache_stan_prefix |
Prefix for output files. A relative path is evaluated from the source file. |
Stan file is automatically named after the chunk label, .i.e.,
"{cache_stan_prefix}{label}.stan"
.
Set cache_stan
to TRUE
or FALSE
for stan chunks so that
output.var
can be omitted. Then set it to the chunk label of stan code
for dependent R chunks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.