as.conflictmat convert an edgelist or a win-loss raw matrix to a matrix of
either a dataframe or a matrix, representing raw win-loss interactions using either an edgelist or a matrix. By default, winners are represented by IDs in the 1st column for an edgelist, and by row IDs for a matrix. Frequency of interactions for each dyad can be represented either by multiple occurrences of the dyad for a 2-column edgelist, or by a third column specifying the frequency of the interaction for a 3-column edgelist.
If the edgelist is a 3-column edgelist in which weight was specified by frequency, use
If the winner is placed in the 2nd column for an edgelist or as the column name for a matrix, specify as
conf.mat is short for "Conflict Matrix".
a class of R objects. It is required to use
as.conflictmat to convert your
raw edgelist or raw win-loss matrix into a matrix of
conf.mat object before
using other functions to find (in)direct pathways and computing dominance probabilities.
Note, when using a 3-column edgelist (e.g. a weighted edgelist) to represent raw win-loss interactions, each dyad must be unique. If more than one rows are found with the same initiator and recipient, sum of the frequencies will be taken to represent the freqency of interactions between this unique dyad. A warning message will prompt your attention to the accuracy of your raw data when duplicate dyads were found in a three-column edgelist.
a named matrix with the
[i,j]th entry equal to the number of times
i wins over
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.