mat2df {yulab.utils} | R Documentation |
mat2df
Description
convert a matrix to a tidy data frame (from wide to long format as described in the tidyverse concept)
Usage
mat2df(x)
Arguments
x |
the input matrix |
Value
a data.frame in long format with the 'value' column stores the original values and 'row' and 'col' columns stored in row and column index as in x
Author(s)
Guangchuang Yu
Examples
x <- matrix(1:15, nrow = 3)
mat2df(x)
[Package yulab.utils version 0.1.5 Index]