rowArgmax | R Documentation |
Column index of the maximum value for each row in a matrix
rowArgmax(X)
X |
A matrix of floats. |
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.
matA <- matrix(sample(seq(12)), nrow = 3) rowArgmax(matA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.