traj_elo {EloRating} | R Documentation |
calculate dominance trajectory
Description
calculate individual Elo rating trajectory over time
Usage
traj_elo(
eloobject,
ID,
from = min(eloobject$stability$date),
to = max(eloobject$stability$date)
)
Arguments
eloobject |
result from |
ID |
character, the ID(s) of the individual(s) |
from |
character, from which date onwards should the trajectory be calculated. By default the first date in the sequence is used |
to |
character, until which date should the trajectory be calculated. By default the last date in the sequence is used |
Value
A data.frame
with as many lines as specified in ID
, columns for ID, date range, the actual slope (trajectory), and the number of observed interactions within the date range
Author(s)
Christof Neumann
Examples
data(adv)
SEQ <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date)
traj_elo(SEQ, "a")
traj_elo(SEQ, "a", from = "2010-01-20", to = "2010-01-30")
# no slope available if ID was not observed interacting
# inside the date range
traj_elo(SEQ, "a", from = "2010-01-17", to = "2010-01-18")
# no slope available if ID was only observed interacting
# once within the date range
traj_elo(SEQ, "a", from = "2010-01-17", to = "2010-01-19")
# for several individuals
traj_elo(SEQ, c("a", "b", "c"))
[Package EloRating version 0.46.18 Index]