force_opposing_positions,optimizer-method | R Documentation |
Force Opposing Positions
## S4 method for signature 'optimizer' force_opposing_positions(object, pos1, pos2)
object |
An optimizer object |
pos1 |
Position for team one |
pos2 |
Position for opposing team |
Forces positions from opposing teams from being included in lineups. Currently accepts a maximum of two positions.
Updated optimizer object
## Not run: 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') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.