zipf_init: Initialise a Handicap

Description Usage Arguments Details Value

Description

Initialise a handicap by splitting a dataframe of races up into groups of similar class, then for each race in the group calculate a rating for the winner using the remaining races in the group. The result is a skeleton handicap from which to start.

Usage

1
zipf_init(races, group_by, race_id, btn_var, .progress = "none")

Arguments

races

dataframe of races

group_by

name of variable(s) to group races found in races, eg. US races you wouldn't group claiming races and Stakes races together, in UK you wouldn't group Class 4 and Listed races.

race_id

name of variable to split races up by so each split is one race

btn_var

name of variable in races with margins between horses

.progress

plyr's progress bar (default = "none", options inc. "text", "time", "tk" or "win")

Details

Related to zipf_race and zipf_hcp, this function will initialise a handicap. It will split a dataframe of races into groups according to group_by, these groups should be races of similar class, most (all) racing jurisdictions employ a type of classification. For each race (identified by race_id), in each group, the winner is assigned a rating based on the other races in the same group.

Value

Returns a list consisting of:


durtal/RcappeR documentation built on May 15, 2019, 6 p.m.