View source: R/0_ff_wins_added.R
ff_wins_added | R Documentation |
(EXPERIMENTAL) This function adds a basic wins-added calculation for each player on every team, presenting the change in wins if that player was removed from the team as the net wins-over-replacement for that player. This can be a bit of a time/compute-expensive calculation.
ff_wins_added(conn, ...)
conn |
an connection to a league made with |
... |
Arguments passed on to
|
Runs base simulation once (with the usual parameters available for ff_simulate), then for every player on every team (except replacement level players):
remove them from that specific roster
reoptimize the lineups just for that roster without the player to calculate what the score ends up being without the player
summarise the new simulation
return the delta in wins and points
Summarise wins added as the difference between the sim with the player and the sim without them
a dataframe summarising the net effect of each player on their team's wins
try({ # try block to prevent CRAN-related issues # n_seasons set so that the example runs more quickly ff_wins_added(mfl_connect(2021,54040), n_seasons = 5) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.