View source: R/Get Lineup Summary.R
get_lineup_summary | R Documentation |
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.
get_lineup_summary( tidy_lu, analysis_type = "live", stack_summary = F, sport = NULL )
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) |
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.