perm_matrix | R Documentation |
This function create permutation matrices.
perm_matrix(n, m = 1, unique = FALSE)
n |
The size of the square matri |
m |
Number of permutations |
unique |
Whether to return unique cases |
This function returns a list of permutation matrices
Alejandro Espinosa-Rada
W <- matrix(c(
0, 1, 0, 0, 0,
0, 0, 1, 0, 0,
1, 0, 0, 0, 0,
0, 0, 0, 0, 1,
0, 0, 0, 1, 0
), byrow = TRUE, ncol = 5)
rownames(W) <- c("P", "Q", "R", "S", "T")
colnames(W) <- rownames(W)
perm_matrix(5, m = 1000, unique = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.