julia_pull() does not work if you define object = ... in the function.
I.e., this works:
> julia_cmd("x = 1")
> julia_pull("x")
[1] 1
This does not work:
> julia_pull("x = 1")
Error: Error happens in Julia.
MethodError: no method matching typeof(; x::Int64)
This method does not support all of the given keyword arguments (and may not support any).
Stacktrace:
[1] top-level scope
@ none:1
[2] eval(m::Module, e::Any)
@ Core ./boot.jl:489
[3] eval_string(x::String)
@ Main.JuliaCall /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/JuliaCall/julia/setup.jl:203
[4] docall(call1::Ptr{Nothing})
@ Main.JuliaCall /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/JuliaCall/julia/setup.jl:0
This is because julia_class() gets called on x = 1 not x.
This behaviour should be documented or revised.
julia_pull()does not work if you defineobject = ...in the function.I.e., this works:
This does not work:
This is because
julia_class()gets called onx = 1notx.This behaviour should be documented or revised.