custom_template {BayesGP}R Documentation

Custom Template Function

Description

This function allows for the dynamic modification of a C++ template within the BayesGP package. Users can specify custom content for the log-likelihood as well as the log-prior of the SD parameter in the template.

Usage

custom_template(
  SETUP = NULL,
  LOG_LIKELIHOOD = NULL,
  LOG_PRIOR = NULL,
  compile_template = FALSE
)

Arguments

SETUP

A character string or vector containing the lines of C++ code to be inserted before the computation of log-likelihood.

LOG_LIKELIHOOD

A character string or vector containing the lines of C++ code to be inserted in the log-likelihood section of the template. Should be NULL if no changes are to be made to this section.

LOG_PRIOR

A character string or vector containing the lines of C++ code to be inserted in the log-prior (of the SD parameter) section of the template. Should be NULL if no changes are to be made to this section.

compile_template

A indicator of whether the new template should be compiled. default is FALSE.

Value

A string representing the path to the temporary .so (or .dll) file containing the compiled custom C++ code.


[Package BayesGP version 0.1.3 Index]