get_edgelist {DynaRankR} | R Documentation |
This function converts data in an interaction matrix to edgelist format.
get_edgelist(mat)
mat |
Interaction matrix containing outcomes of interactions. Dimension names are interpreted as individual identities. |
A two-column dataframe with winners in the first column and losers in the second column.
edges <- C.crocuta.female$interactions[C.crocuta.female$interactions$period == 1989,1:2]
ids <- C.crocuta.female$contestants[C.crocuta.female$contestants$period == 1989,'id']
mat <- edgelist_to_matrix(edgelist = edges, identities = ids)
get_edgelist(mat)