Package 'odds.converter'

Title: Betting Odds Conversion
Description: Conversion between the most common odds types for sports betting. Hong Kong odds, US odds, Decimal odds, Indonesian odds, Malaysian odds, and raw Probability are covered in this package.
Authors: Marco Blume, Sascha Thomsen
Maintainer: Marco Blume <[email protected]>
License: GPL-3
Version: 1.4.9
Built: 2025-03-01 05:36:38 UTC
Source: https://github.com/marcoblume/odds.converter

Help Index


Convert Decimal Odds to all other formats

Description

Convert Decimal Odds to all other formats

Usage

odds.dec2all(x)

Arguments

x

A vector of Decimal odds

Value

A data.frame

Examples

odds.dec2all(c(1.93,2.05))

Convert Decimal Odds to Hong Kong odds

Description

Convert Decimal Odds to Hong Kong odds

Usage

odds.dec2hk(x)

Arguments

x

A vector of Decimal odds

Value

A vector of Hong Kong odds

Examples

odds.dec2hk(c(1.93,2.05))

Convert Decimal Odds to Indonesian odds

Description

Convert Decimal Odds to Indonesian odds

Usage

odds.dec2indo(x)

Arguments

x

A vector of Decimal odds

Value

A vector of Indonesian odds

Examples

odds.dec2indo(c(1.93,2.05))

Convert Decimal Odds to Malaysian odds

Description

Convert Decimal Odds to Malaysian odds

Usage

odds.dec2malay(x)

Arguments

x

A vector of Decimal odds

Value

A vector of Malaysian odds

Examples

odds.dec2malay(c(1.93,2.05))

Convert Decimal Odds to Probabilities

Description

Convert Decimal Odds to Probabilities

Usage

odds.dec2prob(x)

Arguments

x

A vector of Decimal odds

Value

A vector of Probabilities

Examples

odds.dec2prob(c(1.93,2.05))

Convert Decimal Odds to US Odds

Description

Convert Decimal Odds to US Odds

Usage

odds.dec2us(x)

Arguments

x

A vector of Decimal odds

Value

A vector of US odds

Examples

odds.dec2us(c(1.93,2.05))

Calculate the fair (vigorish free) odds for a vector of vigged odds.

Description

Calculate the fair (vigorish free) odds for a vector of vigged odds.

Usage

odds.fv(..., input = "us", output = "us",
  Vectorized2wayOutput1stElement = FALSE)

Arguments

...

Odds of the format defined in input, the odds can be submitted as a data.frame or as a vector

input

Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds

output

Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds

Vectorized2wayOutput1stElement

This speeds up the calculation as the output is a a vector that contains the FV of the first input. Usefull in dplyr chains.

Value

A vector or a matrix of the fair values of the the given vigged values in the format chosen in output

Examples

odds.fv(-120,110)
odds.fv(2.05,3.12,2.90,input="dec",output="prob")
df <- data.frame(Home = c(1.5,1.8,1.9),
                Away = c(2.9,2.2,2.05))
odds.fv(df,input = "dec",output = "prob")
odds.fv(df$Home,df$Away,input="dec",output="prob")
odds.fv(df$Home,df$Away,input="dec",output="prob",Vectorized2wayOutput1stElement = TRUE)

Convert Hong Kong Odds to all other formats

Description

Convert Hong Kong Odds to all other formats

Usage

odds.hk2all(x)

Arguments

x

A vector of Hong Kong odds

Value

A data.frame

Examples

odds.hk2all(c(1.93,0.05))

Convert Hong Kong Odds to Decimal Odds

Description

Convert Hong Kong Odds to Decimal Odds

Usage

odds.hk2dec(x)

Arguments

x

A vector of Hong Kong odds

Value

A vector of Decimal odds

Examples

odds.hk2dec(c(1.93,0.05))

Convert Hong Kong Odds to Indonesian Odds

Description

Convert Hong Kong Odds to Indonesian Odds

Usage

odds.hk2indo(x)

Arguments

x

A vector of Hong Kong odds

Value

A vector of Indonesian odds

Examples

odds.hk2indo(c(1.93,0.05))

Convert Hong Kong Odds to Malaysian Odds

Description

Convert Hong Kong Odds to Malaysian Odds

Usage

odds.hk2malay(x)

Arguments

x

A vector of Hong Kong odds

Value

A vector of Malaysian odds

Examples

odds.hk2malay(c(1.93,0.05))

Convert Hong Kong Odds to Probabilities

Description

Convert Hong Kong Odds to Probabilities

Usage

odds.hk2prob(x)

Arguments

x

A vector of Hong Kong odds

Value

A vector of Probabilities

Examples

odds.hk2us(c(1.93,0.05))

Convert Hong Kong Odds to US Odds

Description

Convert Hong Kong Odds to US Odds

Usage

odds.hk2us(x)

Arguments

x

A vector of Hong Kong odds

Value

A vector of US odds

Examples

odds.hk2us(c(1.93,0.05))

Convert Indonesian to all other formats

Description

Convert Indonesian to all other formats

Usage

odds.indo2all(x)

Arguments

x

A vector of Indonesian odds

Value

A data.frame

Examples

odds.indo2all(c(1.93,2.05))

Convert Indonesian odds to Decimal odds

Description

Convert Indonesian odds to Decimal odds

Usage

odds.indo2dec(x)

Arguments

x

A vector of Indonesian odds

Value

A vector of Hong Kong odds

Examples

odds.indo2dec(c(1.93,2.05))

Convert Indonesian odds to Hong Kong odds

Description

Convert Indonesian odds to Hong Kong odds

Usage

odds.indo2hk(x)

Arguments

x

A vector of Indonesian odds

Value

A vector of Hong Kong odds

Examples

odds.indo2hk(c(1.93,2.05))

Convert Indonesian odds to Malaysian odds

Description

Convert Indonesian odds to Malaysian odds

Usage

odds.indo2malay(x)

Arguments

x

A vector of Indonesian odds

Value

A vector of Malaysian odds

Examples

odds.indo2malay(c(1.93,2.05))

Convert Indonesian odds to Probabilities

Description

Convert Indonesian odds to Probabilities

Usage

odds.indo2prob(x)

Arguments

x

A vector of Indonesian odds

Value

A vector of Probabilities

Examples

odds.indo2hk(c(1.93,2.05))

Convert Indonesian odds to US odds

Description

Convert Indonesian odds to US odds

Usage

odds.indo2us(x)

Arguments

x

A vector of Indonesian odds

Value

A vector of US odds

Examples

odds.indo2us(c(1.93,2.05))

Convert Malaysian Odds to all other formats

Description

Convert Malaysian Odds to all other formats

Usage

odds.malay2all(x)

Arguments

x

A vector of Malaysian odds

Value

A data.frame

Examples

odds.malay2all(c(0.5,-0.6))

Convert Malaysian odds to Decimal odds

Description

Convert Malaysian odds to Decimal odds

Usage

odds.malay2dec(x)

Arguments

x

A vector of Malaysian odds

Value

A vector of Decimal odds

Examples

odds.malay2dec(c(0.5,-0.6))

Convert Malaysian odds to Hong Kong odds

Description

Convert Malaysian odds to Hong Kong odds

Usage

odds.malay2hk(x)

Arguments

x

A vector of Malaysian odds

Value

A vector of Hong Kong odds

Examples

odds.malay2hk(c(1.93,2.05))

Convert Malaysian odds to Indonesian odds

Description

Convert Malaysian odds to Indonesian odds

Usage

odds.malay2indo(x)

Arguments

x

A vector of Malaysian odds

Value

A vector of Indonesian odds

Examples

odds.malay2indo(c(1.93,2.05))

Convert Malaysian odds to Probabilities

Description

Convert Malaysian odds to Probabilities

Usage

odds.malay2prob(x)

Arguments

x

A vector of Malaysian odds

Value

A vector of Probabilities

Examples

odds.malay2prob(c(1.93,2.05))

Convert Malaysian odds to US odds

Description

Convert Malaysian odds to US odds

Usage

odds.malay2us(x)

Arguments

x

A vector of Malaysian odds

Value

A vector of US odds

Examples

odds.malay2us(c(0.5,-0.6))

Transfer a vector to odds into correct parlay odds

Description

Transfer a vector to odds into correct parlay odds

Usage

odds.parlay(..., input = "us", output = "us")

Arguments

...

Odds of the format defined in input

input

Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds

output

Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds

Value

Parlay odds in desired odds format

Examples

odds.parlay(c(-105,-110),output="dec")

Convert Probabilities to to all other formats

Description

Convert Probabilities to to all other formats

Usage

odds.prob2all(x)

Arguments

x

A vector of Probabilities

Value

A data.frame

Examples

odds.prob2all(c(0.5,0.6))

Convert Probabilities to Decimal odds

Description

Convert Probabilities to Decimal odds

Usage

odds.prob2dec(x)

Arguments

x

A vector of Probabilities

Value

A vector of Decimal odds

Examples

odds.prob2dec(c(0.5,0.6))

Convert Probabilities to Hong Kong odds

Description

Convert Probabilities to Hong Kong odds

Usage

odds.prob2hk(x)

Arguments

x

A vector of Probabilities

Value

A vector of Hong Kong odds

Examples

odds.prob2hk(c(0.5,0.6))

Convert Probabilities to Indonesian odds

Description

Convert Probabilities to Indonesian odds

Usage

odds.prob2indo(x)

Arguments

x

A vector of Probabilities

Value

A vector of Indonesian odds

Examples

odds.prob2indo(c(0.5,0.6))

Convert Probabilities to Malaysian odds

Description

Convert Probabilities to Malaysian odds

Usage

odds.prob2malay(x)

Arguments

x

A vector of Probabilities

Value

A vector of Malaysian odds

Examples

odds.prob2malay(c(0.5,0.6))

Convert Probabilities to US odds

Description

Convert Probabilities to US odds

Usage

odds.prob2us(x)

Arguments

x

A vector of Probabilities

Value

A vector of US odds

Examples

odds.prob2us(c(0.5,0.6))

Convert US Odds to all other formats

Description

Convert US Odds to all other formats

Usage

odds.us2all(x)

Arguments

x

A vector of US odds

Value

A data.frame

Examples

odds.us2all(c(-200,105))

Convert US odds to Decimal odds

Description

Convert US odds to Decimal odds

Usage

odds.us2dec(x)

Arguments

x

A vector of US odds

Value

A vector of Decimal odds

Examples

odds.us2dec(c(-200,150))

Convert US odds to Hong Kong odds

Description

Convert US odds to Hong Kong odds

Usage

odds.us2hk(x)

Arguments

x

A vector of US odds

Value

A vector of Hong Kong odds

Examples

odds.us2hk(c(-200,150))

Convert US odds to Indonesian odds

Description

Convert US odds to Indonesian odds

Usage

odds.us2indo(x)

Arguments

x

A vector of US odds

Value

A vector of Indonesian odds

Examples

odds.us2indo(c(-200,150))

Convert US odds to Malaysian odds

Description

Convert US odds to Malaysian odds

Usage

odds.us2malay(x)

Arguments

x

A vector of US odds

Value

A vector of Malaysian odds

Examples

odds.us2malay(c(-200,150))

Convert US odds to Probabilities

Description

Convert US odds to Probabilities

Usage

odds.us2prob(x)

Arguments

x

A vector of US odds

Value

A vector of Probabilities

Examples

odds.us2prob(c(-200,150))

Calculate the vigorish from a vector of vigged odds.

Description

Calculate the vigorish from a vector of vigged odds.

Usage

odds.vig(..., input = "us")

Arguments

...

Odds of the format defined in input, the odds can be submitted as a data.frame or as a vector

input

Default to US Odds. Valid selections are "us" for US odds, "prob" for Probability ,"dec" for Decimal odds,"malay" for Malaysian odds, "hk" for Hong Kong odds, "indo" for Indonesian odds

Value

A vector of the vigs of the the given vigged odds

Examples

odds.vig(-120,110)
odds.vig(2.05,3.12,2.90,input="dec")
df <- data.frame(Home = c(1.5,1.8,1.9),
                Away = c(2.9,2.2,2.05))
odds.vig(df,input = "dec")
odds.vig(df$Home,df$Away,input="dec")