How to access NamedTuple from JuliaCall?


Suppose myFunction is a julia function that returns a named tuple.

I’ve been invoking julia_call() on myFunction as follows:

output_list = julia_call("<julia module>.<myFunction>",<myFunction args>,need_return="R") 
Browse[1]> output_list[1]
Julia Object of type NamedTuple{(:thetahat, :Y), Tuple{Matrix{Float64}, Float64}}.
(thetahat = [0.013788374755447646 ...


How can I access the named elements of output_list like :Y and :thetahat above?
Please note, numeric index is not an option since myFunction will in general output a collection of varying size

1 Like