View source: R/Clean Functions.R
clean_lineup_data | R Documentation |
Takes a draftkings "contest-standings" dataframe with player lineups and returns a tidy version in a "long" format i.e. each row is 1 player corresponding to a lineup id.
clean_lineup_data(contest_data, sport)
contest_data |
A dataframe of raw lineup data from a draftings "contest-standings" csv |
sport |
A string specifying the sport of the contest. tidyDK currently supports 'NFL', 'NHL', 'NBA' and 'MLB' |
The contest data for all lineups in the 'contest-standings' csv in long format. Returns a data.table object
lineups <- clean_lineup_data(contest_data, "NFL") head(lineups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.