Learn R Programming

ffscrapr (version 1.4.8)

ff_rosters: Get League Rosters

Description

This function returns a tidy dataframe of team rosters

Usage

ff_rosters(conn, ...)

# S3 method for espn_conn ff_rosters(conn, week = NULL, ...)

# S3 method for flea_conn ff_rosters(conn, ...)

# S3 method for mfl_conn ff_rosters(conn, custom_players = deprecated(), week = NULL, ...)

# S3 method for sleeper_conn ff_rosters(conn, ...)

Value

A tidy dataframe of rosters, joined to basic player information and basic franchise information

Arguments

conn

a conn object created by ff_connect()

...

arguments passed to other methods (currently none)

week

a numeric that specifies which week to return

custom_players

"[Deprecated]" - now returns custom players by default

Methods (by class)

  • ff_rosters(espn_conn): ESPN: Returns all roster data.

  • ff_rosters(flea_conn): Fleaflicker: Returns roster data (minus age as of right now)

  • ff_rosters(mfl_conn): MFL: returns roster data

  • ff_rosters(sleeper_conn): Sleeper: Returns all roster data.

Examples

Run this code
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- espn_connect(season = 2020, league_id = 899513)
  ff_league(conn)
}) # end try
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  joe_conn <- ff_connect(platform = "fleaflicker", league_id = 312861, season = 2020)

  ff_rosters(joe_conn)
}) # end try
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
  ff_rosters(ssb_conn)
}) # end try
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
  ff_rosters(jml_conn)
}) # end try
# }

Run the code above in your browser using DataLab