Skip to contents

Instantiate a group from an initialized store.

Format

R6::R6Class

Details

The Zarr Group class.

Methods


Method new()

Create a new ZarrGroup instance.

Usage

ZarrGroup$new(
  store,
  path = NA,
  read_only = FALSE,
  chunk_store = NA,
  cache_attrs = TRUE,
  synchronizer = NA
)

Arguments

store

(Store)
Group store, already initialized.

path

(character(1))
Storage path.

read_only

(logical(1))
Whether the group is read-only.

chunk_store

(Store or NA)
Separate storage for chunks.

cache_attrs

(logical(1))
Whether to cache attributes.

synchronizer

(ANY or NA)
Object used to synchronize write access.

Returns

A ZarrGroup instance.


Method get_store()

Get group store

Usage

ZarrGroup$get_store()

Returns

Store.


Method get_path()

Get group path

Usage

ZarrGroup$get_path()

Returns

character(1).


Method get_meta()

Get group metadata

Usage

ZarrGroup$get_meta()

Returns

list() or NULL.


Method get_name()

Get group name

Usage

ZarrGroup$get_name()

Returns

character(1).


Method get_read_only()

Is store read only?

Usage

ZarrGroup$get_read_only()

Returns

logical(1).


Method get_chunk_store()

Get group chunk store

Usage

ZarrGroup$get_chunk_store()

Returns

Store.


Method get_synchronizer()

Get group synchronizer

Usage

ZarrGroup$get_synchronizer()

Returns

Synchronizer object or NA.


Method get_attrs()

Get group attributes

Usage

ZarrGroup$get_attrs()

Returns

Attributes.


Method contains_item()

Test for group membership.

Usage

ZarrGroup$contains_item(item)

Arguments

item

Character item to test for.

Returns

logical(1).


Method get_item()

Obtain a group member.

Usage

ZarrGroup$get_item(item)

Arguments

item

Character item to retrieve.

Returns

ZarrArray or ZarrGroup.


Method create_group()

create a group

Usage

ZarrGroup$create_group(name, overwrite = FALSE)

Arguments

name

Character group name.

overwrite

Logical overwrite.

Returns

ZarrGroup.


Method create_dataset()

Create a dataset (array) within this group.

Usage

ZarrGroup$create_dataset(name, data = NA, ...)

Arguments

name

Character dataset name.

data

Data to add to group.

...

Extra arguments to pass to zarr_create() or array().

Returns

ZarrArray.


Method print()

Print a human-readable summary of the group.

Usage

ZarrGroup$print(...)

Arguments

...

Ignored.

Returns

self (invisibly).


Method tree()

Print an ASCII tree showing the group hierarchy.

Usage

ZarrGroup$tree(level = NA)

Arguments

level

Maximum depth to display. NA (default) shows all levels.

Returns

self (invisibly).


Method clone()

The objects of this class are cloneable with this method.

Usage

ZarrGroup$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.