Represents a multi-dimensional array that can be accessed and subsetted via list of Slice instances.
Public fields
shapeThe shape of the array.
dtypeThe Zarr dtype of the array, as a string like ">f8".
dtype_objThe Zarr dtype of the array, as a Dtype instance.
dataThe array contents as a base R array.
Methods
Method new()
Create a new NestedArray instance.
Usage
NestedArray$new(data, shape = NA, dtype = NA, order = NA)Arguments
dataThe data to initialize the array with. Either NULL, base R array, base R vector (numeric/logical), scalar, or raw vector.
shapeThe shape of the array.
dtypeThe Zarr dtype of the array, as a string like ">f8".
orderThe order of the array, either "C" or "F". Only used when
datais a raw vector. Optional.
Method get()
Subset the array.
Method flatten_to_raw()
Flatten the array contents and convert to a raw vector.
Returns
The data as a flat raw() vector (or plain vector for object dtypes).
