toInterMat: Convert interData object to interaction matrix

Description Usage Arguments Details Value Examples

Description

Creates a matrix cataloging the wins between players in an interData object.

Usage

1
toInterMat(intData)

Arguments

intData

object of class "interData" to build the matrix

Details

toInterMat creates a matrix which uses players from intData as row and column names. Each cell is given an integer value indicating the number of times the player indicated in the row won a dyadic interaction against the player indicted in the column. Ties are ignored for this calculation.

Value

a matrix of player wins

Examples

1
2
3
4
5
6
7
8
9
# generate generic data
interactions <- data.frame (a = sample (letters [1:10], 100, T),
                            b = sample (letters [1:10], 100, T),
                            o = sample (c(-1,-1,0,1,1), 100, T),
                            d = Sys.time () + runif (100, 40, 160))
# convert to interData object
id1 <- intTableConv (interactions)
# calculate using all players
toInterMat (id1)

nmmarquez/linHierarchy documentation built on May 23, 2019, 9:28 p.m.