Skip to content

keller-mark/pizzarr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pizzarr

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

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

Documentation

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

Resources

About

Slice into Zarr arrays in R πŸ•

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages