Description Usage Arguments Value Examples
matrix to sequence conversion
1 | mat2seq(mat)
|
mat |
square interaction matrix with winner in rows and losers in columns (can have column/row names or not) |
a data.frame with a winner and a loser column
1 2 3 4 5 6 7 8 9 10 11 | mat <- matrix(c(0,1,1,0,0,1,0,0,0), ncol=3, byrow = TRUE)
rownames(mat) <- colnames(mat) <- LETTERS[1:3]
mat2seq(mat)
mat <- matrix(c(0,1,1,0,0,1,3,0,0), ncol=3, byrow = TRUE)
rownames(mat) <- colnames(mat) <- LETTERS[1:3]
mat2seq(mat)
# without column names
mat <- matrix(c(0,1,1,0,0,1,0,0,0), ncol=3, byrow = TRUE)
mat2seq(mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.