matrix_to_dt | R Documentation |
Convert matrix to data.table
matrix_to_dt(x, row = "row", col = "col", val = "val")
x |
The matrix |
row |
Name for row variable (default: 'row') |
col |
Name for col variable (default: 'col') |
val |
Name for val variable (default: 'val') |
x <- matrix(runif(9), 3, 3)
rownames(x) <- letters[1:3]
colnames(x) <- letters[4:6]
matrix_to_dt(x)
matrix_to_dt(x, 'sample', 'gene', 'expression')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.