Skip to contents

Minimum operation for vector/matrix/array or LazyTensor, or minimum reduction for LazyTensor.

Usage

min(x, ...)

Arguments

x

input for min.default() or min.LazyTensor().

...

optional arguments for min.default() or min.LazyTensor().

Value

Minimum of input.

Details

If x is a LazyTensor, see min.LazyTensor(), else see min.default().

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
# R base operation
min(1:10)
min(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'

min_x <- min(x_i)                   # LazyTensor object
min_red_x <- min(x_i, "i")          # min reduction indexed by 'i'
}