View source: R/goalmodel_misc.R
matches_last_xdays | R Documentation |
This function calculates the number of matches the two teams have played the last x days.
matches_last_xdays(team1, team2, dates, days_since = 30, first_val = NA)
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. |
A two-column matrix with the number of matches played in the preceding period of time, as given by the days_since argument.
days_since_last_match
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.