Learn R Programming

ffscrapr (version 1.4.8)

ff_draft: Get Draft Results

Description

This function gets a tidy dataframe of draft results for the current year. Can handle MFL devy drafts or startup drafts by specifying the custom_players argument

Usage

ff_draft(conn, ...)

# S3 method for espn_conn ff_draft(conn, ...)

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

# S3 method for mfl_conn ff_draft(conn, custom_players = deprecated(), ...)

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

Value

A tidy dataframe of draft results

Arguments

conn

a conn object created by ff_connect()

...

args for other methods

custom_players

[Deprecated] - now returns custom players by default

Methods (by class)

  • ff_draft(espn_conn): ESPN: returns the current year's draft/auction, including details on keepers

  • ff_draft(flea_conn): Fleaflicker: returns a table of drafts for the current year

  • ff_draft(mfl_conn): MFL: returns a table of drafts for the current year - can handle devy/startup-rookie-picks by specifying custom_players (slower!)

  • ff_draft(sleeper_conn): Sleeper: returns a dataframe of all drafts and draft selections, if available.

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_draft(conn)
}) # end try
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(season = 2020, league_id = 206154)
  ff_draft(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_draft(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_draft(jml_conn)
}) # end try
# }

Run the code above in your browser using DataLab