This repo contains my package called mdarts, which contains functions to play darts matches, train yourself (next release) and analyze your stats (future releases).
In the dedicated section in my blog, you can find articles on the various functions, in which it is explained how to use them.
To install this package, you should run this code in R:
devtools::install_github("mmiots9/mdarts")
To play a match, you have to run this code:
match_501(player1, player2, sets2win = n, legs2win = k)
I strongly recommend to store the result of the function in a variable, so that it is possible to get other features.
There are a set of get functions that allow you to retrieve useful information about a match, a set or even a single leg. These functions are:
In this packages, 7 new S4 classes are used, each with its own methods for the get functions and for generic show and summary functions:
The functions saveMatch and loadMatch allow you to save and load a match into/from a text file.
To play a single-player 501 training leg, you have to run this code:
training501(player, save = T, file = NA)
I strongly recommend to store the result of the function in a variable, so that it is possible to get other features.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.