View source: R/getMaxColIndex.R
getMaxIndexOfRows | R Documentation |
getMaxIndexOfRows
returns the index of the maximal element of each row.
getMinIndexOfRows
returns the index of the minimal element of each row.
getMaxIndexOfCols
returns the index of the maximal element of each col.
getMinIndexOfCols
returns the index of the minimal element of each col.
If a corresponding vector (row or col) is empty, possibly after NA removal, -1 is returned
as index.
getMaxIndexOfRows(x, weights = NULL, ties.method = "random", na.rm = FALSE) getMinIndexOfRows(x, weights = NULL, ties.method = "random", na.rm = FALSE) getMaxIndexOfCols(x, weights = NULL, ties.method = "random", na.rm = FALSE) getMinIndexOfCols(x, weights = NULL, ties.method = "random", na.rm = FALSE)
x |
[ |
weights |
[ |
ties.method |
[ |
na.rm |
[ |
[integer(n)
].
x = matrix(runif(5 * 3), ncol = 3) print(x) print(getMaxIndexOfRows(x)) print(getMinIndexOfRows(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.