lastdaypresent: last day an individual was present

Description Usage Arguments Details Value Author(s) Examples

View source: R/lastdaypresent.R

Description

last day an individual was present with respect to a reference date

Usage

1
lastdaypresent(x, ID = "all", refdate = NULL)

Arguments

x

output from elo.seq

ID

character, if "all", all individuals are returned, otherwise only for the desired ID

refdate

character or Date (YYYY-MM-DD), up to which date the presence data should be considered, by default the last date of the sequene

Details

the function can result in NA for two reasons. 1) the ID is not found in the presence data, which is accompanied by a warning and 2) the ID was not yet present if a referene date is specified

Value

Date or NA

Author(s)

Christof Neumann

Examples

1
2
3
4
5
data(adv); data(advpres)
SEQ <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date,
               presence = advpres)
lastdaypresent(SEQ, ID = "all", refdate = "2010-01-02")
lastdaypresent(SEQ, ID = "f", refdate = "2010-02-02")

EloRating documentation built on March 26, 2020, 7:29 p.m.