which_max2: Generalized which.max(). Returns the index of the cell or...

View source: R/simple_math.R

which_max2R Documentation

Generalized which.max(). Returns the index of the cell or number with the highest value.

Description

A generalization of which.max() that works on matrices and data.frames too.

Usage

which_max2(x)

Arguments

x

a numeric vector, matrix or data.frame.

Examples

m = matrix(runif(9), nrow=3)
m
which_max2(m)

Deleetdk/kirkegaard documentation built on March 26, 2024, 1:19 a.m.