diff --git a/inst/julia/arrow.jl b/inst/julia/arrow.jl new file mode 100644 index 00000000..7ca37165 --- /dev/null +++ b/inst/julia/arrow.jl @@ -0,0 +1,18 @@ +using .Arrow +import RCall.sexp +import RCall.rcopy +import RCall: RClass, rcopytype + +## Julia Tuple will be convert to S3 class JuliaTuple based on R list + +function sexp(x ::Primitive) + sexp(x[:]) +end + +const Ras_vector = R"function(x) x[['as_vector']]()" + +function rcopy(::Type{Primitive}, x::Ptr{EnvSxp}) + rcopy(RCall.rcall_p(Ras_vector, x)) +end + +rcopytype(::Type{RClass{Symbol("arrow::Array")}}, x::Ptr{EnvSxp}) = Primitive diff --git a/inst/julia/setup.jl b/inst/julia/setup.jl index d4da70c6..8350b369 100644 --- a/inst/julia/setup.jl +++ b/inst/julia/setup.jl @@ -230,4 +230,17 @@ function include1(fname) end end +if julia07 + using RCall.Requires +else + macro require(args...) + end +end + +function __init__() + @require Arrow="69666777-d1a9-59fb-9406-91d4454c9d45" include("arrow.jl") +end + end + +using Main.JuliaCall