restrict_opposing_positions,optimizer-method | R Documentation |
Restrict Opposing Positions
## S4 method for signature 'optimizer' restrict_opposing_positions(object, pos1, pos2)
object |
An optimizer object |
pos1 |
Positions for set one |
pos2 |
Positions for set two |
Prevents positions from opposing teams from being included in lineups.
Updated optimizer object
## Not run: opt <- create_optimizer(site = 'DRAFTKINGS', sport = 'HOCKEY', contest_type = 'CLASSIC') opt <- add_players_from_csv(object = opt, filepath = '/Path/to/file.csv') # Restrict lineup from having Skaters and Goalies from opposite teams opt <- restrict_opposing_positions(object = opt, pos1 = c('C','W','D'), pos2 = 'G') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.