-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[R] How to pass Arrow objects like Table between C++ and R? #43675
Comments
Do you want to operate on the arrow table with libarrow or some custom C++ code (potentially using other libraries)? |
I want to use custom C++ code that will need other libraries |
Sorry for the late reply, I am not sure that's possible with cpp11 (which the arrow uses) but that's not my speciality. I found this related issue: #36274 |
So is this an inherent limitation of cpp11? |
I don't really know, sorry. Maybe @jonkeane or @paleolimbot can chime in? |
It seems like this should be possible @ajinkya-k, see #36274 (comment) and let us know if you think you could adapt that code to your use case. Also note the caveats in that thread. |
Hi @amoeba, thanks for sharing the thread. As is clear in the thread, there is no guarantee of stability which means I cannot roll it up into a package. I was hoping there would be a more stable and permanent way to do this. If not, it might be worth putting in a feature request. I think being able to access the exact same Arrow object from both |
The examples given in #36274 should be stable because they use the Arrow C Data Interface, with the help of the |
Thanks! I will give it a try |
Hi @ajinkya-k, I'm going to close this for now but please feel free to re-open and/or comment here. I'm curious if you were able to get something to work. |
Describe the usage question you have. Please include as many useful details as possible.
I was curious how I can pass arrow objects from
R
toC++
(kind of likeR
vectors viaRcpp::NumericVector
). Here's an example of what I am looking for:Say I have a function
sample_post
inR
that takes in anarrow
table and some parameters:For a little more concreteness, let's say
some_fn_cpp
is doinggroup_by
summaries in each iteration of a loop.In
some_fn_rcpp
what should be the type for the first argument that corresponds toarrow_tbl
?NOTE: I would prefer using
Rcpp
but not tied to it. I am okay using something else.Component(s)
R
The text was updated successfully, but these errors were encountered: