add_replacement_level_sim: Add replacement level information to simulation data

Description Usage Arguments Value Examples

Description

Add replacement level information to simulation data

Usage

1
add_replacement_level_sim(sim_data_list, replacement_tables)

Arguments

sim_data_list

List of data frames in the simulation:

  • "pass_model_df" - Passing play-by-play data

  • "rush_model_df" - Rushing play-by-play data

  • "QB_table" - Table of QBs

  • "RB_table" - Table of RBs

  • "WR_table" - Table of WRs

  • "TE_table" - Table of TEs

replacement_tables

List of position tables that designate which players are replacement level:

  • "QB_table" - Table of QBs

  • "RB_table" - Table of RBs

  • "WR_table" - Table of WRs

  • "TE_table" - Table of TEs

Value

The input sim_data_list but with replacement-level players' names in the play-by-play data all set to be Replacement_POSITION and a new column for each of the positional tables indicating which players are replacement level.

Examples

1
2
3
4
# Join positional replacement level information from
# the 2017 position tables to the simulated data:
sim_data_list <- sim_data_list %>%
  add_replacement_level_sim(replacement_tables_17)

ryurko/nflWAR documentation built on May 9, 2019, 7:37 a.m.