Introduction

rray has three goals:

  1. To provide an rray class that implements stricter matrices and arrays than base R, similar in spirit to the tibble package. vignette("the-rray", package = "rray").

  2. To support broadcasting semantics throughout the package, allowing for more flexible and intuitive array operations than are possible with base R. vignette("broadcasting", package = "rray").

  3. To provide a consistent, powerful toolkit for array based manipulation. (WIP, but see the function reference for current functionality)

View the vignette for each goal to learn more about how to use rray.

Installation

You can install from Github with:

Acknowledgements

rray would not be possible without the underlying C++ library, xtensor. Additionally, rray uses a large amount of the new infrastructure in vctrs to be as consistent and type stable as possible.

Alternatives

The Matrix package implements a small subset of column-wise broadcasting operations. rray fully supports broadcasting in all operations.

The original motivation for this package, and even for xtensor, is the excellent Python library, numpy. As far as I know, it has the original implementation of broadcasting, and is a core library that a huge number of others are built on top of.