Given a matrix, it returns a dataframe with two column: - first column are min values for each column of the original matrix - second column are indices of min values
Examples
mat <- matrix(1:9, nrow = 3)
mat
#> [,1] [,2] [,3]
#> [1,] 1 4 7
#> [2,] 2 5 8
#> [3,] 3 6 9
colMin(mat)
#> value index
#> 1 1 1
#> 2 4 1
#> 3 7 1