matrix_apply: Matrix apply

Description Usage Arguments Value Examples

Description

Apply with input and output converted to matrix

Usage

1
matrix_apply(x, margin, FUN, ...)

Arguments

x

Vector or matrix; if vector, the vector will be converted to a matrix.

margin

Vector giving the subscripts the function will be applied over, see apply for details.

FUN

The funcion to be applied, see apply for details.

...

Any additional arguments to FUN.

Value

Output of apply, but always in matrix format.

Examples

1
ShadowCAT:::matrix_apply(c(1:5, NA), 2, sum, na.rm = TRUE)

Karel-Kroeze/ShadowCAT documentation built on May 7, 2019, 12:28 p.m.