odin_js_bundle | R Documentation |
Create a JavaScript bundle of an odin model
odin_js_bundle(code, include_support = TRUE)
code |
An expression, string or path to a file containing
odin code (as for odin_parse_). If |
include_support |
Logical, indicating if the support code should be included. Without this you need to manually copy over odin.js or dust.js depending on what model type you have. |
A list, with contents subject to change.
The interface and generated code here are subject to change. As it stands, it does what is needed for our work in odin.api and does not actually produce a useful bundle!
js <- odin::odin_js_bundle(quote({
deriv(x) <- 1
initial(x) <- 1
}), include_support = FALSE)
head(js$model$code, 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.