View source: R/get_prem_form.R
get_prem_form | R Documentation |
This functions returns a breakdown of each team's average points accumulated, goals scored and goals conceded home and away.
get_prem_form( prem_history = get_prem_history(), home_form_games_lag = 4, home_scored_games_lag = 4, home_conceded_games_lag = 4, away_form_games_lag = 4, away_scored_games_lag = 4, away_conceded_games_lag = 4 )
prem_history |
a |
home_form_games_lag |
The count of lagged games to calculate average home points. Default is 4 |
home_scored_games_lag |
The count of lagged games to calculate average home goals scored. Default is 4, |
home_conceded_games_lag |
The count of lagged games to calculate average home goals conceded. Default is 4, |
away_form_games_lag |
The count of lagged games to calculate average away points. Default is 4, |
away_scored_games_lag |
The count of lagged games to calculate average away goals scored. Default is 4, |
away_conceded_games_lag |
The count of lagged games to calculate average away goals conceded Default is 4, |
This function returns a data.frame
with the following columns:
Character representing a team in a fixture
Character represening the fixture i.e. Arsenal v Everton
Date when the fixture was played
Numeric fulltime home goals scored in the fixture
Numeric fulltime away goals scored in the fixture
Numeric running average of points accumulated (3 for a win, 1 for a draw) either home or away
Numeric running average of goals scored either home or away
Numeric running average of goals conceded either home or away
Numeric logical represnting whether the team was home or away
Numeric logical represnting whether the team won the fixture
Numeric logical represnting whether the team drew the fixture
Daf Howells <dafhowells@yahoo.co.uk>
## Not run: prem_history <- get_prem_history() prem_form_df <- get_prem_form(prem_history) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.