Importing zarr in R via reticulate #1088
mike-lawrence
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all, this was simple enough that I'm sure others have devised similar solutions, but I didn't find any with my initial (possibly insufficient) searches, so I thought I'd post here for others. Scenario is simply wanting to read zarr data into R for analysis. I've seen a couple packages seeking to implement the zarr spec in R, but they seemed incomplete or unmaintained, so I figured simply using zarr-python from R via reticulate would be a fairly straightfoward option. This does mean that the data is read into memory in its entirety, I think, so this approach probably wouldn't work for bigger-than-ram datasets. Anyway, here's what I did:
And if the any of the arrays are 2D with column names stored, easy to convert to tibbles:
Beta Was this translation helpful? Give feedback.
All reactions