Skip to content

Instantly share code, notes, and snippets.

@isaactpetersen
Last active August 29, 2015 14:02
Show Gist options
  • Save isaactpetersen/896f430a9f85f2e804cc to your computer and use it in GitHub Desktop.
Save isaactpetersen/896f430a9f85f2e804cc to your computer and use it in GitHub Desktop.
#Number of players at each position drafted in Top 100 (adjust for your league)
qbReplacements <- 17
rbReplacements <- 35
wrReplacements <- 35
teReplacements <- 13
qbValueOfReplacement <- mean(c(qb$projections[qb$positionRank==qbReplacements],qb$projections[qb$positionRank==(qbReplacements-1)],qb$projections[qb$positionRank==(qbReplacements+1)]))
rbValueOfReplacement <- mean(c(rb$projections[rb$positionRank==rbReplacements],rb$projections[rb$positionRank==(rbReplacements-1)],rb$projections[rb$positionRank==(rbReplacements+1)]))
wrValueOfReplacement <- mean(c(wr$projections[wr$positionRank==wrReplacements],wr$projections[wr$positionRank==(wrReplacements-1)],wr$projections[wr$positionRank==(wrReplacements+1)]))
teValueOfReplacement <- mean(c(te$projections[te$positionRank==teReplacements],te$projections[te$positionRank==(teReplacements-1)],te$projections[te$positionRank==(teReplacements+1)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment