rowMax: Find max for each row

View source: R/maxmin_rowcol.R

rowMaxR Documentation

Find max for each row

Description

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

Usage

rowMax(mat)

Arguments

mat

numeric matrix

Value

A dataframe with values and indices of max for each row

Examples

mat <- matrix(1:9, nrow = 3)
mat

rowMax(mat)


Leonardo-Bo/rgrids documentation built on July 27, 2024, 2:19 a.m.