map | R Documentation |
Maps a function along an array preserving its structure
map(X, along, FUN, subsets = base::rep(1, dim(X)[along]), drop = TRUE, ...)
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 |
subsets |
Whether to apply |
drop |
Remove unused dimensions after mapping; default: TRUE |
... |
Other arguments passed to |
An array where FUN
has been applied
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.