JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

How return julia println info in R? #194

Open junjunlab opened 1 year ago

junjunlab commented 1 year ago

Hi, thanks for this great package. I found the println function does not show in R when I use julia_eval. Can you give some tips? Here is my code:

julia script:

function func(;a=1,b=2)
    println("hhh")
    return a + b
end

R code:

julia_eval('include("./test.jl")')
func <- julia_eval('func')
func(a = 1,b = 2)
# [1] 3

The output only returns 3 without println info. Thanks!