Last chance! 50% off unlimited learning
Sale ends in
Maps a function along an array preserving its structure
map(X, along, FUN, subsets = base::rep(1, dim(X)[along]), drop = TRUE,
...)
An array where FUN
has been applied
An n-dimensional array
Along which axis to apply the function
A function that maps a vector to the same length or a scalar
Whether to apply FUN
along the whole axis or subsets thereof
Remove unused dimensions after mapping; default: TRUE
Other arguments passed to FUN