Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Exploration about arrow #117

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions inst/julia/arrow.jl
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions inst/julia/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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