Skip to contents

Instantiate an array from an initialized store.

Value

A subset of the array, as a NestedArray instance.

Details

The Zarr Array class.

Methods


Method new()

Create a new ZarrArray instance.

Usage

ZarrArray$new(
  store,
  path = NA,
  read_only = FALSE,
  chunk_store = NA,
  synchronizer = NA,
  cache_metadata = TRUE,
  cache_attrs = TRUE,
  write_empty_chunks = TRUE
)

Arguments

store

Array store already initialized.

path

character path

read_only

logical read only?

chunk_store

TODO

synchronizer

TODO

cache_metadata

logical cache metadata?

cache_attrs

logical cache attributes?

write_empty_chunks

logical write empty chunks?

Returns

An Array instance.


Method get_store()

get store from array.

Usage

ZarrArray$get_store()


Method get_path()

get array path

Usage

ZarrArray$get_path()


Method get_name()

get full array name

Usage

ZarrArray$get_name()


Method get_basename()

get the basename of an array

Usage

ZarrArray$get_basename()


Method get_read_only()

get the read only property of an array (TRUE/FALSE)

Usage

ZarrArray$get_read_only()


Method set_read_only()

set the read only property of an array

Usage

ZarrArray$set_read_only(val)

Arguments

val

value to set


Method get_chunk_store()

get the chunk store for an array

Usage

ZarrArray$get_chunk_store()


Method get_shape()

get the shape of an array

Usage

ZarrArray$get_shape()


Method set_shape()

set or reset the size of an array

Usage

ZarrArray$set_shape(value)

Arguments

value

numeric size to set


Method resize()

Change the shape of the array by growing or shrinking one or more dimensions.

Usage

ZarrArray$resize(...)

Arguments

...

arguments for do.call


Method get_chunks()

get the chunk metadata of an array

Usage

ZarrArray$get_chunks()


Method get_dtype()

get the Dtype of an array

Usage

ZarrArray$get_dtype()


Method get_compressor()

get the compressor of an array

Usage

ZarrArray$get_compressor()


Method get_fill_value()

get the fill value of an array

Usage

ZarrArray$get_fill_value()


Method set_fill_value()

set the fill value of an array

Usage

ZarrArray$set_fill_value(val)

Arguments

val

fill value to use


Method get_order()

get the storage order metadata of an array.

Usage

ZarrArray$get_order()


Method get_filters()

get the filters metadata of an array

Usage

ZarrArray$get_filters()


Method get_synchronizer()

get the synchronizer of an array TODO: not implemented

Usage

ZarrArray$get_synchronizer()


Method get_attrs()

get attributes of array

Usage

ZarrArray$get_attrs()


Method get_ndim()

get number of dimensions of array

Usage

ZarrArray$get_ndim()


Method get_size()

get size of an array TODO: not implemented

Usage

ZarrArray$get_size()


Method get_itemsize()

TODO: not implemented

Usage

ZarrArray$get_itemsize()


Method get_nbytes()

get number of bytes of an array

Usage

ZarrArray$get_nbytes()


Method get_nbytes_stored()

TODO

Usage

ZarrArray$get_nbytes_stored()


Method get_cdata_shape()

TODO

Usage

ZarrArray$get_cdata_shape()


Method get_nchunks()

TODO

Usage

ZarrArray$get_nchunks()


Method get_nchunks_initialized()

TODO

Usage

ZarrArray$get_nchunks_initialized()


Method get_is_view()

get is_view metadata of array

Usage

ZarrArray$get_is_view()


Method get_oindex()

get orthogonal index of array

Usage

ZarrArray$get_oindex()


Method get_vindex()

get vectorized index of array

Usage

ZarrArray$get_vindex()


Method get_write_empty_chunks()

get write empty chunks setting of array

Usage

ZarrArray$get_write_empty_chunks()


Method equals()

check if another object refers to the same array. does not check array data

Usage

ZarrArray$equals(other)

Arguments

other

other object to check


Method islice()

TODO

Usage

ZarrArray$islice(start = NA, end = NA)

Arguments

start

start of slice

end

end of slice


Method length()

TODO

Usage

ZarrArray$length()


Method get_item()

Subset the array.

Usage

ZarrArray$get_item(selection)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.


Method get_basic_selection()

get a selection of an array based on a "basic"list of slices

Usage

ZarrArray$get_basic_selection(selection = NA, out = NA, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

out

TODO

fields

TODO


Method get_orthogonal_selection()

TODO

Usage

ZarrArray$get_orthogonal_selection(selection = NA, out = NA, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

out

TODO

fields

TODO


Method get_coordinate_selection()

TODO

Usage

ZarrArray$get_coordinate_selection(selection = NA, out = NA, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

out

TODO

fields

TODO


Method get_mask_selection()

TODO

Usage

ZarrArray$get_mask_selection(selection = NA, out = NA, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

out

TODO

fields

TODO


Method set_item()

Set a subset of the array.

Usage

ZarrArray$set_item(selection, value)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

value

The value to set, as an R array() or a Zarr NestedArray instance.


Method set_basic_selection()

TODO

Usage

ZarrArray$set_basic_selection(selection, value, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

value

TODO

fields

TODO


Method set_orthogonal_selection()

TODO

Usage

ZarrArray$set_orthogonal_selection(selection, value, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

value

TODO

fields

TODO


Method set_coordinate_selection()

TODO

Usage

ZarrArray$set_coordinate_selection(selection, value, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

value

TODO

fields

TODO


Method set_mask_selection()

TODO

Usage

ZarrArray$set_mask_selection(selection, value, fields = NA)

Arguments

selection

Selections are lists containing either scalars, strings, or Slice objects. Two character literals are supported: "..." selects all remaining array dimensions and ":" selects all of a specific array dimension.

value

TODO

fields

TODO


Method get_info()

TODO

Usage

ZarrArray$get_info()


Method get_digest()

TODO

Usage

ZarrArray$get_digest(hashname = "sha1")

Arguments

hashname

name of hash


Method get_hexdigest()

TODO

Usage

ZarrArray$get_hexdigest(hashname = "sha1")

Arguments

hashname

name of hash


Method append()

TODO

Usage

ZarrArray$append(data, axis = 0)

Arguments

data

data to append

axis

axis to append


Method view()

TODO

Usage

ZarrArray$view(
  shape = NA,
  chunks = NA,
  dtype = NA,
  fill_value = NA,
  filters = NA,
  read_only = NA,
  synchronizer = NA
)

Arguments

shape

TODO

chunks

TODO

dtype

TODO

fill_value

TODO

filters

TODO

read_only

TODO

synchronizer

TODO


Method astype()

TODO

Usage

ZarrArray$astype(dtype)

Arguments

dtype

TODO


Method get_dimension_separator()

TODO

Usage

ZarrArray$get_dimension_separator()


Method [()

Set values for a selection using bracket notation (for S3 method).

Usage

ZarrArray$[(...)

Arguments

...

Contains the slicing parameters, one for each dimension. Use empty space to get whole dimension e.g. [1:5,,]

Returns

Sliced Zarr object


Method [<-()

Assign values for a selection using bracket notation (for S3 method).

Usage

ZarrArray$[<-(...)

Arguments

...

Contains the slicing parameters, one for each dimension. Use empty space to get whole dimension e.g. [1:5,,]


Method as.array()

Convert Zarr object to R array (for S3 method). Note that this loads all data into memory.

Usage

ZarrArray$as.array()

Returns

array


Method clone()

The objects of this class are cloneable with this method.

Usage

ZarrArray$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.