onPrepare <- function(inputs, code, env=new.env()){
.reset_execution_plan(env)
.execution_plan$inputsData <- lapply(inputs, makeEmpty)
.execution_plan$nextStreamId <- length(inputs)+1
if(is.language(code)){
eval(code, envir = .execution_plan$env)
}else{
eval(parse(text=code), envir = .execution_plan$env)
}
if(is.function(.execution_plan$env$process)) {
.execution_plan$env$process()
} else {
stop('Nothing to process')
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.