wldf: Generate random winner-loser dataframe

Description Usage Arguments Value Examples

View source: R/wldf.R

Description

Generate random winner-loser dataframe

Usage

1
wldf(ints = 100, actors = 4, intprob = NULL)

Arguments

ints

number of interactions

actors

number of individuals

intprob

vector of interaction probabilities of same length as 'actors'

Value

a dataframe with two variables, winner and loser

Examples

1
2
3
4
5
df<-data.frame(winner=c(1,2,3,1,2,3,2,1,2,3,3,1,2,3,4,3,1,3,2,1,1,1,1,2,2),
loser=c(2,4,4,4,3,2,1,3,3,4,4,2,3,2,3,4,2,4,3,3,3,2,2,4,3)
)
wldf()
wldf(ints=30, actors=3, intprob=c(0.8,0.1,0.1))

jalapic/hierformR documentation built on May 18, 2019, 11:18 a.m.