README.md

mdarts

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.

Installation

To install this package, you should run this code in R:

devtools::install_github("mmiots9/mdarts")

Play a match

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.

Get functions

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:

Classes

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:

Save and Load match functions

The functions saveMatch and loadMatch allow you to save and load a match into/from a text file.

Play a single 501-training leg

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.



mmiots9/darts documentation built on May 4, 2022, 7:04 a.m.