Search notes:

R function: which.max

which.max returns the position of the element with the maximal value in a vector.
The value of that element can be found with max(…).
n <- c (31, 47, 18, 9, 25, 19, 62, 32)

pos_max <- which.max(n)
print(pos_max)
# [1] 7

n[pos_max]
# [1] 62
Github repository about-r, path: /functions/which/max.R

See also

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

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745507731, '18.119.167.222', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/which_max(54): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78