Skip to contents

Finds the minimum value for each column of a matrix, potentially returning the indices instead

Usage

min(X, indices = TRUE)

Arguments

X

matrix

indices

return indices?

Value

Either a list or a vector

Author

Waldir Leoncio

Examples

A <- matrix(c(23, 42, 37, 15, 52))
min(A)
#> $mins
#> [1] 15
#> 
#> $idx
#> [1] 4
#> 
base::min(A) # for comparison
#> [1] 15