% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/matrix-utils.R
\name{mat2df}
\alias{mat2df}
\title{mat2df}
\usage{
mat2df(x)
}
\arguments{
\item{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
}
\description{
convert a matrix to a tidy data frame
(from wide to long format as described in the tidyverse concept)
}
\examples{
x <- matrix(1:15, nrow = 3)
mat2df(x)
}
\author{
Guangchuang Yu
}
