norm_matrix | R Documentation |
Row-normalise a matrix with non-negative entries
norm_matrix(mat)
mat |
a square matrix with non-negative entries. |
a row-stochastic matrix
M <- matrix(c(124, 3, 16,
6, 109, 14,
22, 9, 142),
ncol = 3, nrow = 3, byrow = TRUE)
norm_matrix(M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.