get_player_lineups: Get Player Lineups

View source: R/Analysis External functions.R

get_player_lineupsR Documentation

Get Player Lineups

Description

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.

Usage

get_player_lineups(lu_dat, lineup_players, set_type = "intersection")

Arguments

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.

Value

a subset of lu_data containing players in the lineup_players vector.

Examples



 ## 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') 




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