Learn R Programming

narray (version 0.5.1)

map_one: Apply function that preserves order of dimensions

Description

Apply function that preserves order of dimensions

Usage

map_one(X, along, FUN, pb, drop = TRUE, ...)

Value

An array where FUN has been applied

Arguments

X

An n-dimensional array

along

Along which axis to apply the function

FUN

A function that maps a vector to the same length or a scalar

pb

progress bar object

drop

Remove unused dimensions after mapping; default: TRUE

...

Arguments passed to the function