apply_axes | R Documentation |
Apply a function over specified array axes.
apply_axes(x, axes, fun, ...)
x |
an array. |
axes |
a vector of axes to apply fun over. |
fun |
function to be applied. |
... |
optional arguments to fun. |
array.
z <- array(1:1000, dim = c(10, 10, 10))
a <- apply_axes(z, 3, fft)
a[1,1,] == fft(z[1,1,])
a <- apply_axes(z, 3, sum)
a[1,1,] == sum(z[1,1,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.