get_lineup_summary: Get Lineup Summary

View source: R/Get Lineup Summary.R

get_lineup_summaryR Documentation

Get Lineup Summary

Description

Takes tidy long data from get_tidy_lineups() function and creates lineup summary of total salary and ownership and other statisitics.

For contests that are on-going, the function will calculate the remaining salary for LOCKED players.

Usage

get_lineup_summary(
  tidy_lu,
  analysis_type = "live",
  stack_summary = F,
  sport = NULL
)

Arguments

tidy_lu

a data.frame of tidy lineup data obtained from the get_tidy_lineups() function

analysis_type

"live" for contests that have games which have not started. "post" for contests that have finished.

stack_summary

Boolean value to indicate if a stack summary should be included in data (NOTE: Currently only NFL is supported, and this will not work for "live" analysis)

sport

a character string with one of the sports supported by this package (NFL, NBA, MLB, NHL)

Value

tidy data.table with a row for each player in a lineup in a contest, joined with ownership and points scored data for each player

Examples



lineups <- get_tidy_lineups('./contest-standings-1234564789.csv',
                            './DKsalaries.csv', "NFL")
                            
lu_summary <- get_lineup_summary(tidy_lu, analysis_type = 'post', stack_summary = T, sport = "NFL")                             

head(lu_summary)




Dmunslow/tidyDK documentation built on Nov. 8, 2022, 8:53 a.m.