View source: R/0_ff_simulate_week.R
ff_simulate_week | R Documentation |
This function simulates a single upcoming week using the same methodology as in the season-long simulation, ff_simulate()
.
ff_simulate_week( conn, n = 1000, best_ball = FALSE, seed = NULL, base_seasons = 2012:2020, actual_schedule = TRUE, replacement_level = FALSE, pos_filter = c("QB", "RB", "WR", "TE", "K"), verbose = NULL, return = c("default", "all") )
conn |
an connection to a league made with |
n |
number of times to simulate the upcoming week, default is 1000 |
best_ball |
a logical: are weekly wins based on optimal lineups? |
seed |
an integer to control reproducibility |
base_seasons |
a numeric vector that selects seasons as base data, earliest available is 2012 |
actual_schedule |
a logical: use actual ff_schedule? default is TRUE |
replacement_level |
a logical: use best available on waiver as replacement level? defaults to FALSE for upcoming week simulations |
pos_filter |
a character vector of positions to filter/run, default is c("QB","RB","WR","TE","K") |
verbose |
a logical: print status messages? default is TRUE, configure with options(ffsimulator.verbose) |
return |
one of c("default", "all") - what objects to return in the output list |
an ff_simulation
object which can be passed to plot()
and contains the output data from the simulation.
vignette("basic")
for example usage
vignette("custom")
for examples on using the subfunctions for your own processes.
try({ # try block to prevent CRAN-related issues conn <- mfl_connect(2021, 22627) ff_simulate_week(conn, n = 1000, actual_schedule = TRUE) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.