MatrixToBin {GraphAlignment} | R Documentation |
Convert a matrix of real numbers to a vector of integer bin numbers according to the specified lookup vector.
MatrixToBin(M, lookup, clamp=TRUE)
M |
input matrix |
lookup |
lookup vector |
clamp |
clamp values to lookup range |
The return value is a matrix containing the bin numbers for the elements of the input matrix.
m <- matrix(rnorm(25), 5, 5) lookup <- 0.2*(-5:5) MatrixToBin(m, lookup)