| mat2long | R Documentation |
Expand matrix to data.frame via row and column names
mat2long(x)
x |
a matrix with row and column names |
a data.frame with row names in the Rx column, and the column names in the Cx column, and values in the val column
x <- matrix(1:20, ncol=4)
rownames(x) <- paste0("r", 1:5)
colnames(x) <- paste0("c", 1:4)
mat2long(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.