% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/matrix_to_list_unipartite.R
\name{matrix_to_list_unipartite}
\alias{matrix_to_list_unipartite}
\title{Adjacency matrix to edge list conversion}
\usage{
matrix_to_list_unipartite(x, directed)
}
\arguments{
\item{x}{An adjacency or incidence matrix.}

\item{directed}{Is the network directed? TRUE/FALSE}
}
\value{
A \code{monolayer} object
}
\description{
Convert an adjacency matrix to an edge list.
}
\details{
Assigns column and row names if those do not exist. Cannot handle node attributes/metadata.
}
\examples{
# See examples in:
# https://emln.ecomplab.com/monolayer.html#Unipartite

# Generate a matrix with random weighted interactions
x <- matrix(rbinom(100,1,0.6),10,10)
x <- x*round(runif(100,1,5),0)
# run
matrix_to_list_unipartite(x, directed = TRUE)

}
\seealso{
\code{create_monolayer_network, monolayer}
}
