apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.27k stars 3.47k forks source link

[R] Table viewer for knitr/notebooks #32725

Open asfimport opened 2 years ago

asfimport commented 2 years ago

In RStudio's R Markdown notebook mode, R data.frames get rendered with an interactive table browser where you can paginate through it. I haven't looked into how this works, but it would be nice if we could do something similar with an Arrow Table

Reporter: Neal Richardson / @nealrichardson

Note: This issue was originally created as ARROW-17461. Please see the migration documentation for further details.

asfimport commented 2 years ago

Dewey Dunnington / @paleolimbot: I'll look into this again because it may have changed...the last time I browsed the RStudio source for this I remember seeing a lot of hardcoded stuff. I was looking before because I wanted to customize how some geometry types were rendered and I remember concluding that as.character() was my only option.

If you had a shell around an Arrow Array that was a vctrs implementation (I do something like this in geoarrow but using C Data interface arrays), you can stuff them into a data.frame losslessly with zero copy (but the RMarkdown viewer throws errors for this, too, because it tries to serialize the external pointer and gets back a NULL).