juliaPut | R Documentation |
This function can be used to copy R vectors and matrices to Julia and keep them there. The returned proxy object can be used in place of the original vector or matrix. This is useful to prevent that large R vectors / matrices are repeatedly translated when using an object in multiple calls to Julia.
juliaPut(x)
x |
an R object (can also be a translated Julia object) |
if (juliaSetupOk()) {
# Transfer a large vector to Julia and use it in multiple calls
x <- juliaPut(rnorm(100))
# x is just a reference to a Julia vector now
juliaEval("using Statistics")
juliaCall("mean", x)
juliaCall("var", x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.