View source: R/maxmin_rowcol.R
rowMax | R Documentation |
Given a matrix, it returns a dataframe with two column: - first column are max values for each row of the original matrix - second column are indices of max values
rowMax(mat)
mat |
numeric matrix |
A dataframe with values and indices of max for each row
mat <- matrix(1:9, nrow = 3)
mat
rowMax(mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.