View source: R/transformations.R
matrixToLongTable | R Documentation |
Transform a matrix to long table
matrixToLongTable(x, valueLabel = "value", rowLabel = "row", colLabel = "col")
x |
A matrix |
valueLabel |
Character string, the label of the value |
rowLabel |
Character string, the name of the column holding the row names |
colLabel |
Character string, the name of the column holding the column names |
A data.frame
myMatrix <- matrix(rnorm(24), nrow=4, dimnames=list(LETTERS[1:4], letters[1:6]))
matrixToLongTable(myMatrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.