compute_scores: Giving a player0 an player1 scores, this functions adds one...

Description Usage Arguments Value

View source: R/bpc_helpers.R

Description

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)

Usage

1
2
3
4
5
6
7
compute_scores(
  d,
  player0_score,
  player1_score,
  solve_ties = "random",
  win_score = "higher"
)

Arguments

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

Value

a dataframe with column 'y' that contains the results of the comparison and a ties column indicating if there was ties


bpcs documentation built on Dec. 15, 2020, 5:23 p.m.