days_since_last_match: Time since last match

View source: R/goalmodel_misc.R

days_since_last_matchR Documentation

Time since last match

Description

This function calculates the number of days since the two teams played their respective previous matches.

Usage

days_since_last_match(team1, team2, dates, first_val = NA)

Arguments

team1

Vector of team names.

team2

Vector of team names.

dates

a vector of dates (of type Date).

first_val

the value used for a team's first match in the data, when there are no preceding matches. Default is NA.

Value

A two-column matrix with the number of days since last time each team played.

See Also

matches_last_xdays


opisthokonta/goalmodel documentation built on April 3, 2024, 1:32 a.m.