Skip to contents

This function repeats an actual ffs_schedule() by the appropriate number of seasons.

Usage

ffs_repeat_schedules(actual_schedule, n_seasons)

Arguments

actual_schedule

a schedule retrieved by ffs_schedule()

n_seasons

number of seasons to simulate, default = 100

Value

a dataframe of schedules for the simulation

See also

vignette("Custom Simulations") for example usage

Examples

# \donttest{
try({ # try block to prevent CRAN-related issues
conn <- .ffs_cache("mfl_conn.rds") # cached connection
actual_schedule <- ffs_schedule(conn)

ffs_repeat_schedules(actual_schedule = actual_schedule, n_seasons = 10)
})
#> Warning: Item 2 has 0 rows but longest item has 1; filled with NA
#> Warning: Item 3 has 0 rows but longest item has 1; filled with NA
#> Warning: Item 4 has 0 rows but longest item has 1; filled with NA
#> Warning: Item 5 has 0 rows but longest item has 1; filled with NA
#>     season week franchise_id opponent_id league_id
#>  1:      1   NA         <NA>        <NA>      <NA>
#>  2:      2   NA         <NA>        <NA>      <NA>
#>  3:      3   NA         <NA>        <NA>      <NA>
#>  4:      4   NA         <NA>        <NA>      <NA>
#>  5:      5   NA         <NA>        <NA>      <NA>
#>  6:      6   NA         <NA>        <NA>      <NA>
#>  7:      7   NA         <NA>        <NA>      <NA>
#>  8:      8   NA         <NA>        <NA>      <NA>
#>  9:      9   NA         <NA>        <NA>      <NA>
#> 10:     10   NA         <NA>        <NA>      <NA>
# }