get_edgelist {DynaRankR}R Documentation

Convert data from interaction matrix to edgelist

Description

This function converts data in an interaction matrix to edgelist format.

Usage

get_edgelist(mat)

Arguments

mat

Interaction matrix containing outcomes of interactions. Dimension names are interpreted as individual identities.

Value

A two-column dataframe with winners in the first column and losers in the second column.

Examples

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) 


[Package DynaRankR version 1.1.0 Index]