Learn R Programming

rpm (version 0.7-4)

rowwise_imax_idx: Row-wise argmax (0-based column indices)

Description

Returns the column index of the maximum element in each row of an integer matrix. Uses Armadillo's `index_max()` to avoid deprecated `.max(uword&)`.

Usage

rowwise_imax_idx(A)

Value

A row vector of 0-based column indices of the maxima.

Arguments

A

Integer matrix.