View source: R/dyadic_reversals.R
dyadic_reversals | R Documentation |
compare dyadic relationships before and after a certain date
dyadic_reversals(eloobject, cutpoint = NULL, daterange = NULL)
eloobject |
result from |
cutpoint |
character or Date, the date at which to split into pre and
post (default is |
daterange |
character or Date of length 2, the date range to be
considered (default is |
a data.frame with one line per dyad:
the dyad
the number of interactions for that dyad pre and post cutpoint date
which of the two was dominant (1
= id1, 2
=
id2, 0
= tied relationship, NA
= unknown
relationship, i.e. 0 interactions)
data(adv)
eloobject <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date)
# split at halfway point ("2010-01-17")
# one reversal: a-f
dyadic_reversals(eloobject)
# shift split date so that both interactions for a/f occur in the post period,
# which makes it a tie in post and unknown in pre
dyadic_reversals(eloobject, cutpoint = "2010-01-10")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.