Learn R Programming

ffscrapr (version 1.2.1)

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 flea_conn ff_draft(conn, ...)

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

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

Arguments

conn

a conn object created by ff_connect()

...

args for other methods

custom_players

MFL: TRUE or FALSE - retrieve custom players from the MFL database? (Allows for devy, placeholder picks, slightly slower)

Value

A tidy dataframe of draft results

Methods (by class)

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

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

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

Examples

Run this code
# NOT RUN {
conn <- fleaflicker_connect(season = 2020, league_id = 206154)
ff_draft(conn)
# }
# NOT RUN {
# }
# NOT RUN {
ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
ff_draft(ssb_conn)
# }
# NOT RUN {
# }
# NOT RUN {
jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
ff_draft(jml_conn)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab