% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/edgelist.R
\name{edgelist_to_mat}
\alias{edgelist_to_mat}
\title{Convert edge list to a square sparse matrix}
\usage{
edgelist_to_mat(edges, nodes = NULL, symmetric = TRUE)
}
\arguments{
\item{edges}{A data frame with columns \code{from}, \code{to}, \code{weight}.}

\item{nodes}{Optional character vector of node names. If \code{NULL},
derived from the edge list.}

\item{symmetric}{Logical. If \code{TRUE} (default), the matrix is made
symmetric.}
}
\value{
A sparse \code{dgCMatrix}.
}
\description{
Convert edge list to a square sparse matrix
}
\keyword{internal}
