max.col
to find for minimum or maximum of rows or columns.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".
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") )
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).
A 2-D matrix, same rules as for max.col
Specify how to deal with ties, using same internal rules as max.col
Carl Witthoft, carl@witthoft.com