View source: R/Analysis External functions.R
get_player_lineups | R Documentation |
Returns subset of lineups which contain players provided to function. User specifies the set type, 'intersect' will return lineups that contain all players union will return lineups that contain any player in the provided vector.
get_player_lineups(lu_dat, lineup_players, set_type = "intersection")
lu_dat |
Takes lineup data, long and tidy, or summarized and tidy. |
lineup_players |
vector of player names as they appear in DKSalary file |
set_type |
Which type of subset the function will return. 'intersection' is default and will return lineups that contain all the players in the linuep_players vector. Alternatively, 'union' will return lineups which contain at least 1 of the players in the lineup_players vector. |
a subset of lu_data containing players in the lineup_players vector.
## return lineups which contain both Dak Prescott and Amari Cooper dak_amari <- get_player_lineups(lu_dat, c('Dak Prescott', 'Amari Cooper'), set_type = 'intersection')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.