Description Usage Arguments Details Value
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.
1 | zipf_init(races, group_by, race_id, btn_var, .progress = "none")
|
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") |
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.
Returns a list consisting of:
groups contains group_by param
race_id contains race_id param
counts dataframe of counts per group_by
ratings dataframe of ratings (with 3 variables, group_by, race_id, and zipf_rtg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.