force_opposing_positions-optimizer-method.Rd
Force Opposing Positions
# S4 method for optimizer
force_opposing_positions(object, pos1, pos2)
An optimizer object
Position for team one
Position for opposing team
Updated optimizer object
Forces positions from opposing teams from being included in lineups. Currently accepts a maximum of two positions.
if (FALSE) {
opt <- create_optimizer(site = 'DRAFTKINGS', sport = 'FOOTBALL', contest_type = 'CLASSIC')
opt <- add_players_from_csv(object = opt, filepath = '/Path/to/file.csv')
# Force lineup to include a QB and a WR from the opposing team
opt <- force_opposing_positions(object = opt, pos1 = 'QB', pos2 = 'WR')
}