| with_jlview | R Documentation |
Creates a jlview object and ensures it is released when the scope exits, even if an error occurs. This prevents memory leaks from forgotten releases.
with_jlview(
julia_array,
expr,
writeable = FALSE,
names = NULL,
dimnames = NULL
)
julia_array |
A JuliaObject referencing a Julia array |
expr |
An expression to evaluate with the jlview object bound to |
writeable |
Passed to |
names |
Passed to |
dimnames |
Passed to |
The result of evaluating expr
## Not run:
JuliaCall::julia_setup()
JuliaCall::julia_command("big = randn(100000)")
result <- with_jlview(JuliaCall::julia_eval("big"), {
c(mean(.x), sd(.x))
})
# .x is automatically released here
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.