maketable_all: Make a league table - not limited by seasons or tiers

View source: R/maketable_all.R

maketable_allR Documentation

Make a league table - not limited by seasons or tiers

Description

Make a league table - not limited by seasons or tiers

Usage

maketable_all(
  df = NULL,
  Season = NULL,
  tier = NULL,
  pts = 3,
  begin = NULL,
  end = NULL,
  type = c("both", "home", "away")
)

Arguments

df

The results dataframe

Season

The Season

tier

The tier

pts

Points for a win. Default is 3.

begin

Earliest date of results to make table from (format Y-m-d)

end

Latest date of results to make table from (format Y-m-d)

type

Whether to show all results together or only home or away results.

Value

a dataframe with a league table

Notes

The table that is produced is based upon 3 points for a win (unless otherwise defined), 1 for a draw and 0 for a loss. The table is sorted based upon descending GD and then descending GF as tie-breakers. Use other 'maketable' functions for more precise tables for each league.

Examples

maketable_all(df=england[england$tier==1,],begin="1992-08-15",
     end="2017-07-01") #EPL historical table
maketable_all(df=england[england$tier==1,],begin="1992-08-15",
     end="2017-07-01", type="away") #EPL historical table away results

jalapic/engsoccerdata documentation built on Nov. 15, 2022, 3:34 a.m.