View source: R/sample_drives.R
sample_drives | R Documentation |
Sample a Series of Drives, a strategy to test verses the normal strategy
sample_drives( n_sims, from_yard_line = 25, play_by_play_data, strategy = "normal", single_drive = FALSE, progress = TRUE, ... )
n_sims |
The number of simulations |
from_yard_line |
The starting field position (defaults to 25) |
play_by_play_data |
A data file from nflscrapR prepped using the prep_pbp_data.R function |
strategy |
"normal", "passes_rushes", or "fourth_downs" |
single_drive |
TRUE indicates only a single drive, otherwise, drives sampled until a score occurs |
progress |
logical for inclusion of a progress bar |
... |
Additional arguments for different strategies |
A data.frame of drives
## Not run: sample_drives(2, 25, dt) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.