numbers <- c(11, 2, 5, 7, 3)
min_value <- min(numbers)
# min_value = 2
max_value <- max(numbers)
# max_value = 11
# The position of the smallest and the largest
min_index <- which.min(numbers)
# min_index = 2
max_index <- which.max(numbers)
# max_index = 1
cat("min_value =", min_value, "\n")
cat("max_value =", max_value, "\n")
cat("min_index =", min_index, "\n")
cat("max_index =", max_index, "\n")