Learn R Programming

fflr (version 2.3.0)

team_roster: Fantasy team rosters

Description

The roster of all teams in a league.

Usage

team_roster(
  leagueId = ffl_id(),
  leagueHistory = FALSE,
  scoringPeriodId = NULL,
  ...
)

Value

A dataframe (or list) with league teams.

Arguments

leagueId

Numeric league ID or ESPN fantasy page URL. Defaults to getOption("fflr.leagueId"). Function fails if no ID is found.

leagueHistory

logical; Should the leagueHistory version of the API be called? If TRUE, a list of results is returned, with one element for each historical year of the league.

scoringPeriodId

Integer week of NFL season. By default, NULL will use the current week (see ffl_week()). Scoring periods are always one week in length, whereas matchups might be longer.

...

Additional queries passed to httr::GET(). Arguments are converted to a named list and passed to query alongside view.

See Also

Other roster functions: best_roster(), roster_score(), start_roster()

Examples

Run this code
team_roster(leagueId = "42654852", scoringPeriodId = 1)

Run the code above in your browser using DataLab