| matMaxs {lsei} | R Documentation |
Finds either row or column maximum values of a matrix.
matMaxs(x, dim=1)
x |
numeric matrix. |
dim |
|
Matrix x may contain Inf or -Inf, but not
NA or NaN.
Returns a numeric vector with row or column maximum values.
The function is very much the same as using apply(x, 1, max) or
apply(x, 2, max), but faster.
Yong Wang <yongwang@auckland.ac.nz>
x = cbind(c(1:4,Inf), 5:1) matMaxs(x) matMaxs(x, 2)