Apply a Function to a Margin of an Array

High performance variant of apply() for a fixed set of functions. Considerable speedup is a trade-off for universality, user defined functions cannot be used with this package. However, 20 most currently employed functions are available for usage. They can be divided in three types: reducing functions (like mean(), sum() etc., giving a scalar when applied to a vector), mapping function (like normalise(), cumsum() etc., giving a vector of the same length as the input vector) and finally, vector reducing function (like diff() which produces result vector of a length different from the length of input vector). Optional or mandatory additional arguments required by some functions (e.g. norm type for norm() or normalise() functions) can be passed as named arguments in '...'.


Version 2.0

  • 2016-11-10
  • added following applicable functions: norm(), trapz(), normalise(), cumsum(), cumprod(), multv(), divv(), addv(), subv(), diff()
  • functions admitting or requiring additional arguments can be served via named arguments in '...'.

Version 1.0

  • 2016-02-12
  • first release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.1 by Serguei Sokol, 2 years ago

Browse source code at

Authors: Serguei Sokol

Documentation:   PDF Manual  

GPL (>= 2) license

Imports Rcpp

Suggests testthat

Linking to Rcpp, RcppArmadillo

System requirements: C++11

See at CRAN