Description Usage Arguments Value Examples
Collapse a 2d matrix by taking the betterMax of each row or column
1 | M2VbetterMax(X, MARGIN = 1)
|
X |
a numeric matrix |
MARGIN |
integer of length 1 indicating whether to get the max of each row (1) or column (2) |
A numeric vector where each position contains the largest value stored in that row or column of the input matrix. If all values are NA for a particular position, that position in the output will also contain NA.
1 2 3 4 5 6 | ex1 = matrix(c(1:5,NA,1:4,NA,2), 3, 4)
ex2 = matrix(c(5:7,NA,NA,NA), 2, 3)
M2VbetterMax(ex1, 1)
M2VbetterMax(ex1, 2)
M2VbetterMax(ex2, 1)
M2VbetterMax(ex2, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.