withNimbleOptions | R Documentation |
Temporarily set some NIMBLE options.
withNimbleOptions(options, expr)
options |
a list of options suitable for |
expr |
an expression or statement to evaluate. |
expr as evaluated with given options.
## Not run:
if (!(getNimbleOption('showCompilerOutput') == FALSE)) stop()
nf <- nimbleFunction(run = function(){ return(0); returnType(double()) })
cnf <- withNimbleOptions(list(showCompilerOutput = TRUE), {
if (!(getNimbleOption('showCompilerOutput') == TRUE)) stop()
compileNimble(nf)
})
if (!(getNimbleOption('showCompilerOutput') == FALSE)) stop()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.