feat_position: League Position

Description Usage Arguments Details Value

View source: R/feat_position.R

Description

A function that takes a matchID, and the teams associated to calculate their position in the league table whenever that match was played. If there is no matchDate supplied then, a query to redis to figure out the date of the match is carried out. The weekly positions is queried to figure out the positions for that particular week.

Usage

1
2
feat_position(KEYS, matchID, teamIDs, matchDate = NULL,
  formatter = "%d.%m.%Y")

Arguments

KEYS

A list containing options such as testing / prediction / important variables and information. Also contains API information.

matchID

A character string that represents the matchID under investigation.

teamIDs

A character vector of length two that contains the two teams involved in the match in order of home and away.

matchDate

If NULL the date is queried by in the basic commentary information, else a date of the form dd.mm.yyyy can be supplied.

Details

Redis Keys used;

Value

A data frame with two columns, 'position.h' and 'position.a'.


ntyndall/footballstats documentation built on Aug. 13, 2019, 1:36 p.m.