View source: R/form_fixture_history_league_position.R
form_fixture_history_league_position | R Documentation |
Joins team averages for goals and form with past fixture history and also calculates a team's league position.
form_fixture_history_league_position( form_and_fixture_history = join_form_and_fixture_history() )
form_and_fixture_history |
A |
In addition to the average goals scored and conceded by a team both in recent games and in the same fixture, we would also want to know that's team's league position at the time that the fixture was played. This function joins form and past fixture data frames and calculates the cumulative points for each team after each game within each season.
This function returns a data.frame
with the following columns:
Character values for the team
Character represening the fixture i.e. Arsenal v Everton
Character values for the date that the match was played
Numeric fulltime home goals scored in the fixture
Numeric fulltime away goals scored in the fixture
ftag
Numeric running average of points accumulated (3 for a win, 1 for a draw) either home or away
form
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
Numeric running average of goals scored either home or away
Numeric running average of goals conceded either home or away
Character representing the premier league season
Numeric representing the points gained by the team in the fixture
Numeric representing the cumulative points gained by the team after n games in the season
Numeric representing the game count. A team will play 38 games in the modern era of the premier league
Numeric representing a team's league position after n games in a season
Daf Howells <dafhowells@yahoo.co.uk>
## Not run: df <- join_form_and_fixture_history() form_fixture_history_league_position <- form_fixture_history_league_position(df) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.