Search notes:

R function: which.min

which.min returns the position of the element with the minimal value in a vector.
n <- c (31, 47, 18, 9, 25, 19, 62, 32)

pos_min <- which.min(n)
print(pos_min)
# [1] 4

n[pos_min]
# [1] 9
Github repository about-r, path: /functions/which/min.R

See also

which, which.max
Index to (some) R functions

Index