Description Usage Arguments Value Examples
Create a function to find replacement level based on league attempts
1 2 | create_league_replacement_fn(replacement_depth, positions, attempt_type,
combine_wrte = 0)
|
replacement_depth |
Number indicating how many players of that position and performance type each team should have, then every player have that will be considered replacement level. |
positions |
String indicating which position(s) to find the replacement level for, can only be (1) "QB", (2) "RB" (or "FB"), (3) "WR", or (4) "TE". |
attempt_type |
String indicating which type of attempts to use from the position tables to sort the players by for finding the league replacement level. |
combine_wrte |
Indicator for whether or not to combine the TE and WR position tables, which will be primarily used for rushing attempts by WRs and TEs (default is 0). |
Function that returns a vector of Player_ID_Name values indicating the replacement level for the position given the league replacement_depth and attempt_type.
1 2 3 4 5 | # Create the replacement function for RBs by stating every team has 3 RBs on their
# team for rushing, and every RB with less rushing attempts than the top 3*32 is
# considered replacement level:
find_replacement_RB_rush <- create_league_replacement_fn(3, "RB", "Rush_Attempts")
replacement_RBs <- find_replacement_RB_rush(model_data_list)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.