Skip to content

Commit

Permalink
Add vignette example
Browse files Browse the repository at this point in the history
  • Loading branch information
grimbough committed Sep 27, 2024
1 parent 4be7ec3 commit 61dd235
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions inst/rmd/DelayedArray.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ library(Rarr)
interface to Zarr array, and use delayed operations and block processing to
efficiently work with large on-disk data.

### Working with an existing Zarr array

To demonstrate using the DelayedArray framework, we'll pick the example file containing
32-bit integers arranged in the "column first" ordering.

Expand Down Expand Up @@ -38,3 +40,11 @@ dim(zarr_array)
chunk_dim(zarr_array)
```

### Realizing an in-memory array to Zarr

```{r}
X <- matrix(rnorm(1000), ncol=10)
zarr_path <- tempfile(fileext = ".zarr")
zarr_X <- writeZarrArray(X, zarr_array_path = zarr_path, chunk_dim = c(10,10))
zarr_X
```

0 comments on commit 61dd235

Please sign in to comment.