-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.qmd
More file actions
54 lines (40 loc) · 1.66 KB
/
Copy pathREADME.qmd
File metadata and controls
54 lines (40 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
format:
gfm:
default-image-extension: ""
---
<!-- README.md is generated from README.qmd. Please edit that file -->
```{r}
#| include: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# grumpy
<!-- badges: start -->
[](https://github.com/Bisaloo/grumpy/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/Bisaloo/grumpy)
<!-- badges: end -->
The `{grumpy}` R package provides a way to read NumPy's `.npy` files into R. It supports a wide range of data types and array shapes.
As a file format generated by a Python package, `.npy` files are prime candidates for using the `{reticulate}` package to read them into R.
However, this comes with downsides in terms of performance, flexibility, and robustness of the R package infrastructure.
`{grumpy}`, on the other hand, is a pure R package with a single dependency (`{jsonlite}`), and is performant, flexible. Overall, it is designed to be used deep in the dependency graph of other packages.
For more details on the motivation and design principles underpinning `{grumpy}`, see the dedicated vignette: `vignette("design", package = "grumpy")`.
## Installation
You can install the released version of grumpy with:
``` r
install.packages("grumpy")
```
and the development version like so:
``` r
# install.packages("pak")
pak::pak("Bisaloo/grumpy")
```
## Example
```{r}
library(grumpy)
read_npy(system.file("extdata", "test_2d.npy", package = "grumpy"))
```