fractionize_byname | R Documentation |
This function divides all entries in a
by the specified sum,
thereby "fractionizing" the matrix.
fractionize_byname(a, margin)
a |
the matrix to be fractionized |
margin |
If |
a fractionized matrix of same dimensions and same row and column types as a
.
M <- matrix(c(1, 5, 4, 5), nrow = 2, ncol = 2, byrow = TRUE, dimnames = list(c("p1", "p2"), c("i1", "i2"))) %>% setcoltype("Products") %>% setrowtype("Industries") fractionize_byname(M, margin = c(1,2)) fractionize_byname(M, margin = 1) fractionize_byname(M, margin = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.