Created
August 19, 2013 15:22
-
-
Save drewconway/6270345 to your computer and use it in GitHub Desktop.
Team format for Yhat Fantasy Football Challegne
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Model only works for 15-man rosters with this format of players! | |
num.teams <- 10 | |
qb <- 1 | |
rb <- 2 | |
wr <- 2 | |
te <- 1 | |
flex <- 1 | |
def <- 1 | |
pk <- 1 | |
bench <- 6 | |
flex.pos <- c("RB","WR") | |
# Data dtructure for team drafts | |
teams <- lapply(1:num.teams, function(i) { | |
list("QB"=rep(NA, qb), | |
"RB"=rep(NA, rb), | |
"WR"=rep(NA, wr), | |
"TE"=rep(NA, te), | |
"FLEX"=rep(NA, flex), | |
"PK"=rep(NA, pk), | |
"DEF"=rep(NA, def), | |
"BENCH"=rep(NA, bench)) | |
}) | |
draft.order <- rep(c(1:num.teams,rev(1:num.teams)), 7) | |
draft.order <- c(draft.order, 1:num.teams) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment