set_flex_positions,optimizer-method | R Documentation |
Method for setting FLEX/UTIL positions. Can be used to limit FLEX/UTIL to a user-specified set of possible positions (see examples).
## S4 method for signature 'optimizer' set_flex_positions(object, positions)
object |
An optimizer object |
positions |
Value to set the roster size (subject to validity checks). |
Updated Optimizer object
## Not run: opt <- create_optimizer(site = 'DRAFTKINGs', sport = 'HOCKEY') opt <- add_players_from_csv(object = opt, filepath = '/Path/to/file.csv') # Default FLEX is c('C','W','D') -- here we'll remove D opt <- set_flex_positions(object = opt, positions = c('C','W')) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.