Description Usage Arguments Examples
Will replace positions with wildcard if their count exceeds the max allowed. This is commonly used to set a player to a utility or flex position.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | normalize_positions(pos, pos_max, wildcard)
normalize_dk_nfl(pos)
normalize_dk_nba(pos)
normalize_dk_nhl(pos)
normalize_fd_nfl(pos)
normalize_fd_mlb(pos)
normalize_fd_nascar(pos)
normalize_fdr_nba(pos)
|
pos |
a character vector of existing positions |
pos_max |
a named numeric vector giving the max allowed players at that position |
wildcard |
a string specifying what to replace positions with |
1 2 3 4 5 6 7 8 | ## Not run:
pos <- c("P", "1B", "1B", "2B", "3B", "SS", "OF", "OF", "OF")
pos_max <- c("P" = 1, "1B" = 1, "2B" = 1, "3B" = 1, "SS" = 1, "OF" = 3)
wildcard <- "UTIL"
normalize_positions(pos, pos_max, wildcard)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.