README.md

slabR

R build
status Codecov test
coverage CodeFactor

slabR is an R package for creating summary slabs from arrays according to a summary scheme slab(array, scheme). This is useful for ecosystem models which use a single value to represent volumes within a 3D grid. The different summaries are implemented in C++ using Rcpp for speed.

Motivation

slabR was built to summarise 3D ocean model output. Often the volumes of interest remain constant, but different arrays exist for time steps and variables.

slabR performs common summary operations on an array by indexing and group membership. We refer to the combination of indices and groupings as a summary scheme when represented as a dataframe. By using a summary scheme, multiple volumes can be summarised from an array, only visiting the pixels of interest, and without leaving the Rcpp loop. slabR plays nicely with pipes, using the array to be processed as the first argument. This allows a constant summary scheme to by applied with purrr::map(list(arrays), slab, scheme).

Installation

The development version can be downloaded from GitHub with:

remotes::install_github("Jack-H-Laverick/slabR")

Project Documentation

Head to GitHub.io to view the full documentation.

The navbar contains links to an index of documented functions and a change log.



Jack-H-Laverick/slabR documentation built on Jan. 10, 2021, 4:38 p.m.