Skip to contents

Arrays

Core classes for creating and manipulating chunked, compressed, N-dimensional Zarr arrays. ZarrArray is the primary interface for reading and writing array data; NestedArray handles in-memory representation.

ZarrArray
ZarrArray Class
NestedArray
NestedArray Class

Groups

Hierarchical containers for organizing multiple arrays and sub-groups, analogous to directories in a filesystem.

ZarrGroup
ZarrGroup Class

Storage

Backend storage classes that control where array data is persisted. Use DirectoryStore for local files, MemoryStore for ephemeral in-memory data, or HttpStore for read-only access to remote Zarr stores.

Store
Store Class
DirectoryStore
DirectoryStore Class
MemoryStore
MemoryStore Class
HttpStore
HttpStore Class

Compressors and filters

Codec classes for compressing and decompressing chunk data. Each codec wraps a compression algorithm (Zstd, LZ4, Blosc, zlib, etc.) and can be passed to array creation functions via the compressor argument.

Codec
Codec Class
ZstdCodec
ZstdCodec Class
Lz4Codec
Lz4Codec Class
ZlibCodec
ZlibCodec Class
GzipCodec
GzipCodec Class
Bz2Codec
Bz2Codec Class
LzmaCodec
LzmaCodec Class
BloscCodec
BloscCodec Class
VLenUtf8Codec
VLenUtf8Codec Class
get_codec()
Get a codec instance from the registry.

Attributes

Access to user-defined metadata on arrays and groups, stored as JSON-serializable key-value pairs in .zattrs.

Attributes
Attributes Class

Convenience functions

High-level functions for common workflows: creating arrays with specific fill values, opening existing stores, and saving R arrays to Zarr format.

zarr_create()
Create an empty array
zarr_create_empty()
Create an array filled with NAs.
zarr_create_zeros()
Create an array filled with zeros.
zarr_create_array()
Create an array initialized with data.
zarr_create_group()
Create a group.
zarr_open()
Convenience function to open a group or array using file-mode-like semantics.
zarr_open_group()
Open a group using file-mode-like semantics.
zarr_open_array()
Open an array using file-mode-like semantics.
zarr_save_array()
Convenience function to save a ZarrArray to the local file system.

Utilities

Helper functions for slicing, type conversion, and package configuration. Use slice() and zb_slice() to select sub-regions of arrays.

slice()
Convenience function for the internal Slice R6 class constructor.
zb_slice()
Convenience function for the internal Slice R6 class constructor with zero-based indexing and exclusive stop index.
is_slice()
Check if a value is a Slice instance.
int()
Convenience function for the internal Int class constructor.
zb_int()
Convenience function for the internal Int class constructor with zero-based indexing
as_scalar()
Convert a value to a scalar to opt-out of R default vector casting behavior. This uses the jsonlite::unbox function to "tag" the value as a scalar.
is_scalar()
Check if a value is a scalar (i.e., a one-element vector that was converted with as_scalar).
is_key_error()
Check if an error is a KeyError.
pizzarr_sample()
pizzarr demo data
zarr_volcano()
Create a demo Zarr group containing R's volcano dataset
pizzarr_option_defaults
pizzarr_option_defaults
Dtype
Dtype Class