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 |
Convert Decimal Odds to all other formats
odds.dec2all(x)
odds.dec2all(x)
x |
A vector of Decimal odds |
A data.frame
odds.dec2all(c(1.93,2.05))
odds.dec2all(c(1.93,2.05))
Convert Decimal Odds to Hong Kong odds
odds.dec2hk(x)
odds.dec2hk(x)
x |
A vector of Decimal odds |
A vector of Hong Kong odds
odds.dec2hk(c(1.93,2.05))
odds.dec2hk(c(1.93,2.05))
Convert Decimal Odds to Indonesian odds
odds.dec2indo(x)
odds.dec2indo(x)
x |
A vector of Decimal odds |
A vector of Indonesian odds
odds.dec2indo(c(1.93,2.05))
odds.dec2indo(c(1.93,2.05))
Convert Decimal Odds to Malaysian odds
odds.dec2malay(x)
odds.dec2malay(x)
x |
A vector of Decimal odds |
A vector of Malaysian odds
odds.dec2malay(c(1.93,2.05))
odds.dec2malay(c(1.93,2.05))
Convert Decimal Odds to Probabilities
odds.dec2prob(x)
odds.dec2prob(x)
x |
A vector of Decimal odds |
A vector of Probabilities
odds.dec2prob(c(1.93,2.05))
odds.dec2prob(c(1.93,2.05))
Convert Decimal Odds to US Odds
odds.dec2us(x)
odds.dec2us(x)
x |
A vector of Decimal odds |
A vector of US odds
odds.dec2us(c(1.93,2.05))
odds.dec2us(c(1.93,2.05))
Calculate the fair (vigorish free) odds for a vector of vigged odds.
odds.fv(..., input = "us", output = "us", Vectorized2wayOutput1stElement = FALSE)
odds.fv(..., input = "us", output = "us", Vectorized2wayOutput1stElement = FALSE)
... |
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. |
A vector or a matrix of the fair values of the the given vigged values in the format chosen in output
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)
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
odds.hk2all(x)
odds.hk2all(x)
x |
A vector of Hong Kong odds |
A data.frame
odds.hk2all(c(1.93,0.05))
odds.hk2all(c(1.93,0.05))
Convert Hong Kong Odds to Decimal Odds
odds.hk2dec(x)
odds.hk2dec(x)
x |
A vector of Hong Kong odds |
A vector of Decimal odds
odds.hk2dec(c(1.93,0.05))
odds.hk2dec(c(1.93,0.05))
Convert Hong Kong Odds to Indonesian Odds
odds.hk2indo(x)
odds.hk2indo(x)
x |
A vector of Hong Kong odds |
A vector of Indonesian odds
odds.hk2indo(c(1.93,0.05))
odds.hk2indo(c(1.93,0.05))
Convert Hong Kong Odds to Malaysian Odds
odds.hk2malay(x)
odds.hk2malay(x)
x |
A vector of Hong Kong odds |
A vector of Malaysian odds
odds.hk2malay(c(1.93,0.05))
odds.hk2malay(c(1.93,0.05))
Convert Hong Kong Odds to Probabilities
odds.hk2prob(x)
odds.hk2prob(x)
x |
A vector of Hong Kong odds |
A vector of Probabilities
odds.hk2us(c(1.93,0.05))
odds.hk2us(c(1.93,0.05))
Convert Hong Kong Odds to US Odds
odds.hk2us(x)
odds.hk2us(x)
x |
A vector of Hong Kong odds |
A vector of US odds
odds.hk2us(c(1.93,0.05))
odds.hk2us(c(1.93,0.05))
Convert Indonesian to all other formats
odds.indo2all(x)
odds.indo2all(x)
x |
A vector of Indonesian odds |
A data.frame
odds.indo2all(c(1.93,2.05))
odds.indo2all(c(1.93,2.05))
Convert Indonesian odds to Decimal odds
odds.indo2dec(x)
odds.indo2dec(x)
x |
A vector of Indonesian odds |
A vector of Hong Kong odds
odds.indo2dec(c(1.93,2.05))
odds.indo2dec(c(1.93,2.05))
Convert Indonesian odds to Hong Kong odds
odds.indo2hk(x)
odds.indo2hk(x)
x |
A vector of Indonesian odds |
A vector of Hong Kong odds
odds.indo2hk(c(1.93,2.05))
odds.indo2hk(c(1.93,2.05))
Convert Indonesian odds to Malaysian odds
odds.indo2malay(x)
odds.indo2malay(x)
x |
A vector of Indonesian odds |
A vector of Malaysian odds
odds.indo2malay(c(1.93,2.05))
odds.indo2malay(c(1.93,2.05))
Convert Indonesian odds to Probabilities
odds.indo2prob(x)
odds.indo2prob(x)
x |
A vector of Indonesian odds |
A vector of Probabilities
odds.indo2hk(c(1.93,2.05))
odds.indo2hk(c(1.93,2.05))
Convert Indonesian odds to US odds
odds.indo2us(x)
odds.indo2us(x)
x |
A vector of Indonesian odds |
A vector of US odds
odds.indo2us(c(1.93,2.05))
odds.indo2us(c(1.93,2.05))
Convert Malaysian Odds to all other formats
odds.malay2all(x)
odds.malay2all(x)
x |
A vector of Malaysian odds |
A data.frame
odds.malay2all(c(0.5,-0.6))
odds.malay2all(c(0.5,-0.6))
Convert Malaysian odds to Decimal odds
odds.malay2dec(x)
odds.malay2dec(x)
x |
A vector of Malaysian odds |
A vector of Decimal odds
odds.malay2dec(c(0.5,-0.6))
odds.malay2dec(c(0.5,-0.6))
Convert Malaysian odds to Hong Kong odds
odds.malay2hk(x)
odds.malay2hk(x)
x |
A vector of Malaysian odds |
A vector of Hong Kong odds
odds.malay2hk(c(1.93,2.05))
odds.malay2hk(c(1.93,2.05))
Convert Malaysian odds to Indonesian odds
odds.malay2indo(x)
odds.malay2indo(x)
x |
A vector of Malaysian odds |
A vector of Indonesian odds
odds.malay2indo(c(1.93,2.05))
odds.malay2indo(c(1.93,2.05))
Convert Malaysian odds to Probabilities
odds.malay2prob(x)
odds.malay2prob(x)
x |
A vector of Malaysian odds |
A vector of Probabilities
odds.malay2prob(c(1.93,2.05))
odds.malay2prob(c(1.93,2.05))
Convert Malaysian odds to US odds
odds.malay2us(x)
odds.malay2us(x)
x |
A vector of Malaysian odds |
A vector of US odds
odds.malay2us(c(0.5,-0.6))
odds.malay2us(c(0.5,-0.6))
Transfer a vector to odds into correct parlay odds
odds.parlay(..., input = "us", output = "us")
odds.parlay(..., input = "us", output = "us")
... |
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 |
Parlay odds in desired odds format
odds.parlay(c(-105,-110),output="dec")
odds.parlay(c(-105,-110),output="dec")
Convert Probabilities to to all other formats
odds.prob2all(x)
odds.prob2all(x)
x |
A vector of Probabilities |
A data.frame
odds.prob2all(c(0.5,0.6))
odds.prob2all(c(0.5,0.6))
Convert Probabilities to Decimal odds
odds.prob2dec(x)
odds.prob2dec(x)
x |
A vector of Probabilities |
A vector of Decimal odds
odds.prob2dec(c(0.5,0.6))
odds.prob2dec(c(0.5,0.6))
Convert Probabilities to Hong Kong odds
odds.prob2hk(x)
odds.prob2hk(x)
x |
A vector of Probabilities |
A vector of Hong Kong odds
odds.prob2hk(c(0.5,0.6))
odds.prob2hk(c(0.5,0.6))
Convert Probabilities to Indonesian odds
odds.prob2indo(x)
odds.prob2indo(x)
x |
A vector of Probabilities |
A vector of Indonesian odds
odds.prob2indo(c(0.5,0.6))
odds.prob2indo(c(0.5,0.6))
Convert Probabilities to Malaysian odds
odds.prob2malay(x)
odds.prob2malay(x)
x |
A vector of Probabilities |
A vector of Malaysian odds
odds.prob2malay(c(0.5,0.6))
odds.prob2malay(c(0.5,0.6))
Convert Probabilities to US odds
odds.prob2us(x)
odds.prob2us(x)
x |
A vector of Probabilities |
A vector of US odds
odds.prob2us(c(0.5,0.6))
odds.prob2us(c(0.5,0.6))
Convert US Odds to all other formats
odds.us2all(x)
odds.us2all(x)
x |
A vector of US odds |
A data.frame
odds.us2all(c(-200,105))
odds.us2all(c(-200,105))
Convert US odds to Decimal odds
odds.us2dec(x)
odds.us2dec(x)
x |
A vector of US odds |
A vector of Decimal odds
odds.us2dec(c(-200,150))
odds.us2dec(c(-200,150))
Convert US odds to Hong Kong odds
odds.us2hk(x)
odds.us2hk(x)
x |
A vector of US odds |
A vector of Hong Kong odds
odds.us2hk(c(-200,150))
odds.us2hk(c(-200,150))
Convert US odds to Indonesian odds
odds.us2indo(x)
odds.us2indo(x)
x |
A vector of US odds |
A vector of Indonesian odds
odds.us2indo(c(-200,150))
odds.us2indo(c(-200,150))
Convert US odds to Malaysian odds
odds.us2malay(x)
odds.us2malay(x)
x |
A vector of US odds |
A vector of Malaysian odds
odds.us2malay(c(-200,150))
odds.us2malay(c(-200,150))
Convert US odds to Probabilities
odds.us2prob(x)
odds.us2prob(x)
x |
A vector of US odds |
A vector of Probabilities
odds.us2prob(c(-200,150))
odds.us2prob(c(-200,150))
Calculate the vigorish from a vector of vigged odds.
odds.vig(..., input = "us")
odds.vig(..., input = "us")
... |
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 |
A vector of the vigs of the the given vigged odds
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")
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")