Skip to contents

Combine information needed for optimization. Passed to dk_optimize().

Usage

dk_prepare_schematic(
  draft_group_id,
  draft_group_exp_fp = NULL,
  draft_group = NULL,
  rules = NULL,
  include_players = NULL,
  exclude_players = NULL,
  exclude_questionable = FALSE
)

Arguments

draft_group_id

Sequence of digits that correspond to a draft table/group. If draft_group_id and contest_key are both passed, contest_key is ignored.

draft_group_exp_fp

A data.frame with two columns draftable_id (found in the output of get_draftable_players()) and exp_fp (expected fantasy points). Note that the Showdown Captain Mode game type includes two rows for each player/defense. If draft_group contains rows not found in draft_group_exp_fp, then a warning is issued and those missing rows are dropped. If NULL (the default), and exp_fp does not exist in draft_group, then exp_fp is set equal to the ppg value returned by get_player_list().

draft_group

Object returned by get_draftable_players(). If NULL (the default), then this object is fetched using the draft_group_id. The following columns are required: draftable_id, player_id, first_name, last_name, display_name, salary, team_id, status.

rules

Object returned by get_gametype_rules(). If NULL (the default), rules are fetched using the draft_group_id.

include_players

A vector of player IDs to include. If NULL (the default), then use all players found with get_draftable_players().

exclude_players

A vector of player IDs to exclude.

exclude_questionable

Exclude players with statuses that indicate they will not play. These include players that are questionable, doubtful, out, and injured. Default is FALSE.

Examples

  if (FALSE) { # \dontrun{
    dk_prepare_schematic(draft_group_id = 80584)
  } # }