Skip to contents

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

Usage

max(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))
max(A)
#> $maxs
#> [1] 52
#> 
#> $idx
#> [1] 5
#> 
base::max(A) # for comparison
#> [1] 52