dichotMat | R Documentation |
Make a binary matrix out of a weighted matrix
dichotMat(mat, min)
mat |
a numeric matrix |
min |
a threshold. All values in |
If a cell has value smaller than a minimum value, the cell becomes 0. If the cell has a value of at least the minimum value, it becomes 1. The procedure will work for any matrix, not necessarily a square one.
the dichotomized matrix
M <- matrix(round(runif(20),1), ncol = 4) dichotMat(M, min = .45)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.