Skip to content

keller-mark/pizzarr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f47057 Β· Feb 25, 2025
Dec 3, 2024
Feb 25, 2025
Dec 19, 2024
Dec 19, 2024
Feb 25, 2025
Oct 24, 2024
Feb 25, 2025
Feb 20, 2025
Nov 21, 2024
May 27, 2024
Jun 12, 2024
Feb 20, 2025
Nov 21, 2024
Nov 21, 2024
Nov 21, 2024
Feb 20, 2025
Sep 18, 2023

Repository files navigation

pizzarr pizzarr website

A Zarr implementation for R.

Installation

Installation requires R 4.0.0 or greater.

install.packages("devtools")
devtools::install_github("keller-mark/pizzarr")

Usage

library(pizzarr)

a <- array(data=1:20, dim=c(2, 10))
#      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
# [1,]    1    3    5    7    9   11   13   15   17    19
# [2,]    2    4    6    8   10   12   14   16   18    20
z <- zarr_create(shape=dim(a), dtype="<f4", fill_value=NA)

z$set_item("...", a)

selection <- z$get_item(list(slice(1, 2), slice(1, 5)))

print(selection$data)
#      [,1] [,2] [,3] [,4] [,5]
# [1,]    1    3    5    7    9
# [2,]    2    4    6    8   10

Current status

(This section has been adapted from the Rarr project README).

Stores

Store Status
(reading / writing)
MemoryStore βœ” / βœ”
DirectoryStore βœ” / βœ”
HttpStore βœ” / ❌

Data types

Zarr Data Type Status
(reading / writing)
Notes
b1 / boolean βœ” / βœ” Converted to logical in R.
i1 / int8 βœ” / βœ” Converted to integer in R.
u1 / uint8 βœ” / βœ” Converted to integer in R.
i2 / int16 βœ” / βœ” Converted to integer in R.
u2 / uint16 βœ” / βœ” Converted to integer in R.
i4 / int32 βœ” / βœ” Converted to integer in R.
u4 / uint32 βœ” / βœ” Converted to integer in R.
i8 / int64 βœ” / βœ” Converted to integer in R.
u8 / uint64 βœ” / βœ” Converted to integer in R.
f2 / float16 βœ” / βœ” Converted to double in R.
f4 / float32 βœ” / βœ” Converted to double in R.
f8 / float64 βœ” / βœ” Converted to double in R.
complex ❌ / ❌
timedelta ❌ / ❌
datetime ❌ / ❌
string βœ” / βœ” Converted to character in R.
Unicode βœ” / βœ” Converted to character in R.
void * ❌ / ❌
Structured data types ❌ / ❌
Object data type - VLenUTF8 βœ” / βœ” Converted to character in R.

Note: no effort is made to assess loss of precision due to conversion.

Compression tools

Data Type Status
(reading / writing)
Notes
zlib / gzip βœ” / βœ” Only system default compression level 6 is enabled for writing.
bzip2 βœ” / βœ” Only system default compression level 6 is enabled for writing.
blosc βœ” / βœ” Only system default compression level 5 is enabled for writing.
LZMA βœ” / βœ” Only system default compression level 9 is enabled for writing.
LZ4 βœ” / βœ”
Zstd βœ” / βœ”

Development

setwd("path/to/pizzarr")
install.packages("devtools")
devtools::install()
devtools::load_all()

Testing

Set TESTTHAT_CPUS=# in .Renviron to run tests in parallel

devtools::check()
devtools::test()

Documentation

install.packages("devtools")
install.packages("pkgdown")
devtools::document()
pkgdown::build_site()

Resources