This function creates a Zarr object from an R vector, matrix or array. Default settings will be taken from the R object (data type, shape). Data is chunked into chunks of length 100 (or less if the array is smaller) and compressed.
Arguments
- x
The R object to convert. Must be a vector, matrix or array of a numeric or logical type.
- name
Optional. The name of the Zarr array to be created.
- location
Optional. If supplied, either an existing zarr_group in a Zarr object, or a character string giving the location on a local file system where to persist the data. If the argument is a
zarr_group, argumentnamemust be provided. If the argument gives the location for a new Zarr store then the location must be writable by the calling code. As per the Zarr specification, it is recommended to use a location that ends in ".zarr" when providing a location for a new store. If argumentnameis given then the Zarr array will be created in the root of the Zarr store with that name. If thenameargument is not given, a single-array Zarr store will be created. If thelocationargument is not given, a Zarr object is created in memory.