minRow {cgwtools}R Documentation

Functions which mimic max.col to find for minimum or maximum of rows or columns.

Description

These are Q&D wrappers around max.col to make it easy to get the positions of max or the min of either rows or columns of an array. The description of the base function is, for comparison, "Find the maximum position for each row of a matrix".

Usage

maxRow(mat,ties.method = c("random", "first", "last") )
minRow(mat,ties.method = c("random", "first", "last") )
minCol(mat,ties.method = c("random", "first", "last") )
maxCol(mat,ties.method = c("random", "first", "last") )

Arguments

mat

A 2-D matrix, same rules as for max.col

ties.method

Specify how to deal with ties, using same internal rules as max.col

Value

For each of these functions, same as for max.col : index of a max or min value for each row or column, an integer vector of length nrow(mat) or ncol(mat).

Author(s)

Carl Witthoft, carl@witthoft.com

See Also

max.col


[Package cgwtools version 4.1 Index]