
Last chance! 50% off unlimited learning
Sale ends in
rray_max()
computes the maximum along a given axis or axes. The
dimensionality of x
is retained in the result.
rray_max(x, axes = NULL)
A vector, matrix, or array to reduce.
An integer vector specifying the axes to reduce over. 1
reduces
the number of rows to 1, performing the reduction along the way. 2
does the
same, but with the columns, and so on for higher dimensions. The default
reduces along all axes.
Currently, objects are coerced to rray
s before the reduction is applied.
# NOT RUN {
x <- rray(1:10, c(5, 2))
rray_max(x)
rray_max(x, 1)
rray_max(x, 2)
# }
Run the code above in your browser using DataLab