map_one: Apply function that preserves order of dimensions

View source: R/map.r

map_oneR Documentation

Apply function that preserves order of dimensions

Description

Apply function that preserves order of dimensions

Usage

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

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

Value

An array where FUN has been applied


mschubert/arraytools documentation built on Jan. 12, 2023, 8:21 a.m.