tmb_name <- "{{pkg}}_TMBExports"
tmb_flags <- commandArgs(trailingOnly = TRUE)
if(file.exists(paste0(tmb_name, ".cpp"))) {
if(length(tmb_flags) == 0) tmb_flags <- ""
TMB::compile(file = paste0(tmb_name, ".cpp"),
PKG_CXXFLAGS = tmb_flags,
safebounds = FALSE, safeunload = FALSE)
file.copy(from = paste0(tmb_name, .Platform$dynlib.ext),
to = "..", overwrite = TRUE)
}
# cleanup done in ../Makevars[.win]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.