Maximum operation for vector/matrix/array or LazyTensor
, or maximum
reduction for LazyTensor
.
Arguments
- x
input for
max.default()
ormax.LazyTensor()
.- ...
optional arguments for
max.default()
ormax.LazyTensor()
.
Details
If x
is a LazyTensor
, see max.LazyTensor()
, else see
max.default()
.
Examples
if (FALSE) {
# R base operation
max(1:10)
max(c(NA, 1, 2), na.rm = TRUE)
# LazyTensor operation
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
max_x <- max(x_i) # LazyTensor object
max_red_x <- max(x_i, "i") # max reduction indexed by 'i'
}