juliaPut {JuliaConnectoR} | R Documentation |
Create a Julia proxy object from an R object
Description
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.
Usage
juliaPut(x)
Arguments
x |
an R object (can also be a translated Julia object) |
Examples
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)
}
[Package JuliaConnectoR version 1.1.3 Index]