find_max_cell: Maximum (or minimum) value cell in a matrix.

View source: R/color2D.matplot.R

find_max_cellR Documentation

Maximum (or minimum) value cell in a matrix.

Description

Find the indices of the maximum value in a matrix.

Usage

 find_max_cell(x,max=TRUE) 

Arguments

x

a numeric matrix

max

The default is to return the indices of the maximum value(s). ‘⁠max=FALSE⁠’ returns those of the minimum.

Value

A list containing the column (x) and row (y) indices.

Note

Intended to enable the user to mark cells in ‘⁠color2D.matplot⁠’. Remember to subtract 0.5 from both values to center the mark in the cell.

Author(s)

Jim Lemon


plotrix documentation built on Nov. 10, 2023, 5:07 p.m.