get_points | R Documentation |
This function takes a vector of chess match results as input and converts them to tournament points.
get_points(results)
results |
A vector of strings representing the results of chess matches. |
Each result should be one of the following strings: "0-1", "1-0", "1/2-1/2", or "*". The function returns 0, 1, 0.5, or NA respectively for each result. If a result is not one of these four strings, it throws an error.
A numeric vector representing the points from the chess matches.
get_points(c("0-1", "1-0", "1/2-1/2", "*")) # returns c(0, 1, 0.5, NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.