make_lineup_helper: Determine optimal entries against a given opponent lineup

View source: R/make_lineup.R

make_lineup_helperR Documentation

Determine optimal entries against a given opponent lineup

Description

Matches athletes into events. Each event is filled by the least capable (slowest) swimmer who can win or place in that event. For example if Team A has six breaststrokers at 57.00, 58.00, 59.00 and three 1:00.00s and Team B has three breaststrokers, all 1:01.00 then Team A's entries will be the three 1:00.00s because they're sufficient to win.

Usage

make_lineup_helper(
  i,
  df_helper,
  op_df_helper,
  end_seq,
  max_ind_entries_helper = 2,
  result_col_helper = result_col
)

Arguments

i

a sequential list of numbers incremented by 1. Used to index function.

df_helper

a data frame of times for the team to be entered. Must contain column Event with the same event naming convention as op_df, a column with name matching result_col containing times or diving scores, and a column called Name containing athlete names

op_df_helper

a data frame containing the opponent lineup. Must contain column Event with the same event naming convention as df, a column with name matching result_col containing times or diving scores, and a column called Name containing athlete names

end_seq

how many events score

max_ind_entries_helper

a numeric value denoting the maximum number of individual events that may be entered by a single athlete

result_col_helper

name of column with results in it

Value

a data frame containing athletes entered into events


SwimmeR documentation built on March 31, 2023, 8:27 p.m.