Learn R Programming

ffscrapr (version 1.2.1)

ff_transactions: Get League Transactions

Description

This function returns a tidy dataframe of transactions - generally one row per player per transaction per team. Each trade is represented twice, once per each team.

Usage

ff_transactions(conn, ...)

# S3 method for flea_conn ff_transactions(conn, franchise_id = NULL, ...)

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

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

Arguments

conn

the list object created by ff_connect()

...

additional args for other methods

franchise_id

fleaflicker returns transactions grouped by franchise id, pass a list here to filter

custom_players

TRUE or FALSE - fetch custom players

week

A week filter for transactions - 1 returns all offseason transactions. Default 1:17 returns all transactions.

Value

A tidy dataframe of transaction data

Methods (by class)

  • flea_conn: Fleaflicker: returns all transactions, including free agents, waivers, and trades.

  • mfl_conn: MFL: returns all transactions, including auction, free agents, IR, TS, waivers, and trades.

  • sleeper_conn: Sleeper: returns all transactions, including free agents, waivers, and trades.

Examples

Run this code
# NOT RUN {
conn <- fleaflicker_connect(season = 2020, league_id = 312861)
ff_transactions(conn)
# }
# NOT RUN {
# }
# NOT RUN {
dlf_conn <- mfl_connect(2019, league_id = 37920)
ff_transactions(dlf_conn)
# }
# NOT RUN {
jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
x <- ff_transactions(jml_conn, week = 1:17)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab