conv_margins: Convert lengths beaten into seconds

Description Usage Arguments Details Value Examples

Description

Converts margins, between the winner of a race and the horses behind, from lengths into seconds.

Usage

1
conv_margins(btn_l, cum_l = TRUE, win_time = NULL, conditions = NULL)

Arguments

btn_l

beaten lengths

cum_l

default TRUE, indicates whether btn_l is cumulative or not

win_time

winners time, optional param, entering will mean the function returns an individual race time for each runner

conditions

default NULL, enter race conditions if BHA lengths per second scale is desired, or enter a scale manually

Details

As default, the lengths per second scale used is the US convention of 5 lengths per second. However, if the race was run under the jurisdiction of the BHA, then entering an abbrevation of the races conditions will apply the lengths per second scale employed by the BHA. See also bha_ls and bhascale.

Value

margins, in seconds, if win_time is entered then individual times per runner are returned

Examples

1
2
3
4
5
6
7
8
## Not run: 
btn_l <- c(0, 0.2, 0.5, 1, 1.5)
conv_margins(btn_l = btn_l)
conv_margins(btn_l = btn_l, cum_l = FALSE)
conv_margins(btn_l = btn_l, win_time = 59)
conv_margins(btn_l = btn_l, win_time = 59, conditions = "f-ggf")

## End(Not run)

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