% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/riskset.R
\name{prepare_edgelist}
\alias{prepare_edgelist}
\title{Normalise a raw edgelist to the standard three-column format}
\usage{
prepare_edgelist(raw)
}
\arguments{
\item{raw}{Matrix or data frame with at least 3 columns.}
}
\value{
A data frame with columns \code{time} (integer), \code{sender} (integer),
\code{receiver} (integer), and \code{eveid} (character).
}
\description{
Accepts a matrix or data frame with columns in order: time, sender,
receiver. Returns a data frame with named integer columns and an \code{eveid}
dyad key (\code{"sender_receiver"}).
}
\examples{
el <- prepare_edgelist(data.frame(t = 1:5, s = c(1,2,3,1,2), r = c(2,3,1,3,1)))
head(el)
}
