getData: getData

Description Usage Arguments Details Value Examples

View source: R/getData.R

Description

This function allows R users to retrieve match statistics and betting odds for English Premier League games over the past 17 seasons. The data is retrieved from DataHub.io and football-data.co.uk

Usage

1
getData(season, bet = TRUE, team = "all")

Arguments

season

The season argument allows the user to specify for which season he or she wants to get EPL data for. Ensure that season is in the correct character string format, e.g. "1819" for 2018 - 2019 Season; and "1718" for 2017 - 2018 season.

bet

The bet argument allows the user to specify whether he or she wants to retrieve betting data. The default setting for bet is TRUE. If the user only wants the match statistics, set bet to FALSE.

team

The team argument allows the user to filter the data to find match statistics and betting data that he or she is only interested in. The default stting is "all", which retrieves data for all teams in the English Premier league for the specified season. If the user wants to look at only one specific team he or she can use this argument. Ensure that team name is in correct character string format, e.g. "Chelsea" or "Man City".

Details

The function allows the user to input three arguments. The first argument is season, which specifies the EPL Season that the user wants to retrieve data for. The second argument is bet, which specifies whether the user wants to retrieve additional betting odds data for the matches. The third argument is team, which specifies whether the user wants to retrieve data only for a particular team.

Value

A dataframe with match statistics and / or betting odds for the specified Season.

Examples

1
2
3
getData(season = "1819", bet = FALSE, team = "Arsenal")
getData(season = "1617", bet = TRUE, team = "Chelsea")
getData(season = "1415", team = "Man City")

gl2668/eplR documentation built on Dec. 18, 2019, 2:34 a.m.