This function returns a tidy dataframe with one row for every starter (and bench) for every week and their scoring, if available.

ff_starters(conn, ...)

# S3 method for flea_conn
ff_starters(conn, week = 1:17, ...)

# S3 method for mfl_conn
ff_starters(conn, week = "all", season = NULL, ...)

# S3 method for sleeper_conn
ff_starters(conn, week = 1:17, ...)

Arguments

conn

the list object created by ff_connect()

...

other arguments (currently unused)

week

a numeric or one of YTD (year-to-date) or AVG (average to date)

season

the season of interest - generally only the most recent 2-3 seasons are available

Value

A tidy dataframe with every player for every week, including a flag for whether they were started or not

Methods (by class)

  • flea_conn: Fleaflicker: returns who was started as well as what they scored.

  • mfl_conn: MFL: returns the player fantasy scores for each week (not the actual stats)

  • sleeper_conn: Sleeper: returns only "who" was started, without any scoring/stats data. Only returns season specified in initial connection object.

Examples

# \donttest{ conn <- fleaflicker_connect(season = 2020, league_id = 206154) ff_starters(conn) # } # \donttest{ dlf_conn <- mfl_connect(2020, league_id = 37920) ff_starters(conn = dlf_conn, week = 1:2)
#> # A tibble: 938 x 11 #> franchise_id franchise_name season week starter_status should_start #> <chr> <chr> <dbl> <int> <chr> <dbl> #> 1 0013 Advance Repti… 2020 1 starter 1 #> 2 0013 Advance Repti… 2020 1 starter 1 #> 3 0013 Advance Repti… 2020 1 starter 1 #> 4 0013 Advance Repti… 2020 1 starter 1 #> 5 0013 Advance Repti… 2020 1 starter 1 #> 6 0013 Advance Repti… 2020 1 starter 1 #> 7 0013 Advance Repti… 2020 1 starter 1 #> 8 0013 Advance Repti… 2020 1 starter 1 #> 9 0013 Advance Repti… 2020 1 starter 1 #> 10 0013 Advance Repti… 2020 1 nonstarter 0 #> # … with 928 more rows, and 5 more variables: player_score <dbl>, #> # player_id <chr>, player_name <chr>, pos <chr>, team <chr>
# } # \donttest{ jml_conn <- sleeper_connect(league_id = "522458773317046272", season = 2020) jml_starters <- ff_starters(jml_conn) # }