dt2mat | R Documentation |
Convert between 'data.table' and 'matrix'
dt2mat(x)
mat2dt(x, idvar)
x |
data.table / matrix |
idvar |
idvar string |
matrix / data.table
x <- data.table::data.table(
gene = c('ENSG001', 'ENSG002', 'ENSG003'),
sampleA = c(1787, 10, 432),
sampleB = c(1143, 3, 268))
dt2mat(x)
mat2dt(dt2mat(x), 'gene')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.