I am using RCall (julia 0.6) with R 3.3.3. Specifically, the R package “bnlearn”.
There seems to be some problem with importing a particular type of list structure from R:
> using RCall
> R"library(bnlearn)"
> R"data(marks)"
> R"bn = gs(marks)"
> bn = @rget bn
ERROR: MethodError: RCall.rcopy(::Type{Any}, ::Ptr{RCall.NilSxp}) is ambiguous. Candidates:
rcopy(::Type{T}, ::Ptr{RCall.NilSxp}) where T in RCall at /usr/home/ko/.julia/v0.6/RCall/src/convert/base.jl:34
rcopy(::Type{Any}, s::Ptr{S}) where S<:RCall.Sxp in RCall at /usr/home/ko/.julia/v0.6/RCall/src/convert/base.jl:31
Possible fix, define
rcopy(::Type{Any}, ::Ptr{RCall.NilSxp})
Stacktrace:
[1] rcopy(::Type{Dict{Symbol,Any}}, ::Ptr{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/base.jl:151
[2] #rcopy#70(::Array{Any,1}, ::Function, ::Ptr{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/default.jl:15
[3] rcopy(::Type{Any}, ::Ptr{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/base.jl:31
[4] rcopy(::Type{Dict{Symbol,Any}}, ::Ptr{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/base.jl:151
[5] #rcopy#70(::Array{Any,1}, ::Function, ::Ptr{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/default.jl:15
[6] #rcopy#69(::Array{Any,1}, ::Function, ::RCall.RObject{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/default.jl:6
[7] rcopy(::RCall.RObject{RCall.VecSxp}) at /usr/home/ko/.julia/v0.6/RCall/src/convert/default.jl:6
julia>
"