xpts_h2h: Calculate expected points for a head-to-head league table.

Description Usage Arguments Details Value See Also Examples

View source: R/xpts_h2h.R

Description

Calculate expected points (xPts) and expected rank (xRank) for each team in a head-to-head table as the average points (i.e. 0, 1, 3) expected against all teams in that league each gameweek (including AVERAGE team, present if odd number of teams in the league), not just the actual opponent. Requires entering username and password in interactive dialogue in order to access private leagues. Uses the ['fplscrapR'](https://github.com/wiscostret/fplscrapR).

Usage

1
xpts_h2h(leagueid)

Arguments

leagueid

an integer with a single valid head-to-head league ID

Details

League ID can be found when examining the head-to-head table on the official FPL site, appearing after the '/leagues/' part of the URL, e.g. '1' in 'https://fantasy.premierleague.com/leagues/1/standings/h'

Value

a dataframe with expected points (xPts) and expected rank (xRank) added to actual points, actual rank, and team information

See Also

'fplscrapR' package by [wiscostret](https://github.com/wiscostret/fplscrapR)

Examples

1

JoGall/fantasypl documentation built on Nov. 14, 2019, 12:11 a.m.