Create an object of Optimizer

create_optimizer(
  site,
  sport,
  contest_type = "CLASSIC",
  players = list(),
  filepath = NULL
)

Arguments

site

The site being used for optimization

sport

The sport being optimized

contest_type

The type of contest; determines base constraints (e.g., Classic, Showdown(DK)/Single(FD or Yahoo)). Default: CLASSIC

players

List of players to build lineups from (defaults to empty list)

filepath

Alternate method for adding players at time of creation. Passing a filepath will result in an internal call to add_players_from_csv. If players is provided, filepath will be ignored.

Details

This function is used to instantiate a new object of class optimizer, which is the central component of the dfsOptimizer package.

Examples

mod <- create_optimizer(site = 'DRAFTKINGS', sport = 'HOCKEY')