Skip to contents

Returns the past or remaining league fixtures for every team in the league, with each fixture shown twice (once for the home team and once for the away team), from a match results dataframe created using worldfootballR::fb_match_results() or following the same structure.

Usage

get_fixtures(matches, remaining = TRUE)

Arguments

matches

dataframe containing match results (created using worldfootballR::fb_match_results() or following the same structure)

remaining

get remaining fixtures (TRUE) or past fixtures (FALSE) (default = TRUE)

Value

returns a dataframe with three columns - team, home_or_away, opponent - with each fixture appearing twice, once for the home team and once for the away team

Examples

if (FALSE) {
results <-
  worldfootballR::fb_match_results(
    country = "ENG", gender = "M", season_end_year = 2024
    )

get_fixtures(results, remaining = TRUE)
}