odin_dust | R Documentation |
Compile an odin model to work with dust.
odin_dust(x, ..., options = NULL)
odin_dust_(x, ..., options = NULL)
x |
Either the name of a file to read, a text string (if length is greater than 1 elements will be joined with newlines) or an expression. |
... |
Arguments passed to odin_dust_options,
including |
options |
An odin::odin_options or odin_dust_options
object. If given it overrides arguments; if it is already a
|
Note that this does not (yet) support the full odin output object, instead creating the more limited dust interface. However, for many uses this should be considerably faster than the interface that odin normally uses (built on dde).
When including custom C++ code you may want to set additional options in order to enable compilation. You can do this by including pseudo-attributes
// [[odin.dust::cpp_std(C++17)]]
- use this to change the C++
standard used in compilation; this is passed to dust::dust()
as the cpp_std
option. It is only necessary to pass in values
greater than C++11 at present as that is dust's default.
// [[odin.dust::linking_to(pkg)]]
- use this to make include
files present in an R package (e.g., BH) available. You can use
as many of these attributes as you need.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.