colMax: Find max for each column

View source: R/maxmin_rowcol.R

colMaxR Documentation

Find max for each column

Description

Given a matrix, it returns a dataframe with two column: - first column are max values for each column of the original matrix - second column are indices of max values

Usage

colMax(mat)

Arguments

mat

Matrix object

Value

A dataframe with values and indices of max for each column

Examples

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

colMax(mat)


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