matches_last_xdays: Number of matches played in the preceding period

View source: R/goalmodel_misc.R

matches_last_xdaysR Documentation

Number of matches played in the preceding period

Description

This function calculates the number of matches the two teams have played the last x days.

Usage

matches_last_xdays(team1, team2, dates, days_since = 30, first_val = NA)

Arguments

team1

Vector of team names.

team2

Vector of team names.

dates

a vector of dates (of type Date).

days_since

The number of days back in time to count matches.

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 matches played in the preceding period of time, as given by the days_since argument.

See Also

days_since_last_match


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