Description Usage Arguments Value
Giving a player0 an player1 scores, this functions adds one column to the data frame containing who won (0= player0 1=player1 2=tie) and another if it was a tie. The ties column superseeds the y column. If it was tie the y column does not matter y column: (0= player0 1=player1 2=tie) ties column (0=not tie, 1=tie)
1 2 3 4 5 6 7 | compute_scores(
d,
player0_score,
player1_score,
solve_ties = "random",
win_score = "higher"
)
|
d |
dataframe |
player0_score |
name of the column in data |
player1_score |
name of the column in data |
solve_ties |
Method to solve the ties, either randomly allocate, or do nothing, or remove the row from the datasetc('random', 'none', 'remove'). |
win_score |
decides if who wins is the one that has the highest score or the lowest score |
a dataframe with column 'y' that contains the results of the comparison and a ties column indicating if there was ties
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.