rowArgmax: Column index of the maximum value for each row in a matrix

rowArgmaxR Documentation

Column index of the maximum value for each row in a matrix

Description

Column index of the maximum value for each row in a matrix

Usage

rowArgmax(X)

Arguments

X

A matrix of floats.

Value

a vector of the index of column for each row. Note, when multiple columns have the same value, only the earliest column will be returned.

Examples

matA <- matrix(sample(seq(12)), nrow = 3)
rowArgmax(matA)

single-cell-genetics/cardelino documentation built on Nov. 22, 2022, 4:05 p.m.