Skip to content

Instantly share code, notes, and snippets.

@isaactpetersen
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save isaactpetersen/56359dc81a6e16de552a to your computer and use it in GitHub Desktop.

Select an option

Save isaactpetersen/56359dc81a6e16de552a to your computer and use it in GitHub Desktop.
#Calculate fantasy points per week
passYdsPts <- list()
passTdsPts <- list()
passIntPts <- list()
rushYdsPts <- list()
rushTdsPts <- list()
recPts <- list()
recYdsPts <- list()
recTdsPts <- list()
twoPtsPts <- list()
fumblesPts <- list()
fantasyPts <- list()
for(i in 1:simulations){
passYdsPts[[i]] <- passYds[[i]] * passYdsMultiplier
passTdsPts[[i]] <- passTds[[i]] * passTdsMultiplier
passIntPts[[i]] <- passInt[[i]] * passIntMultiplier
rushYdsPts[[i]] <- rushYds[[i]] * rushYdsMultiplier
rushTdsPts[[i]] <- rushTds[[i]] * rushTdsMultiplier
recPts[[i]] <- rec[[i]] * recMultiplier
recYdsPts[[i]] <- recYds[[i]] * recYdsMultiplier
recTdsPts[[i]] <- recTds[[i]] * recTdsMultiplier
twoPtsPts[[i]] <- twoPts[[i]] * twoPtsMultiplier
fumblesPts[[i]] <- fumbles[[i]] * fumlMultiplier
fantasyPts[[i]] <- passYdsPts[[i]] + passTdsPts[[i]] + passIntPts[[i]] + rushYdsPts[[i]] + rushTdsPts[[i]] + recPts[[i]] + recYdsPts[[i]] + recTdsPts[[i]] + twoPtsPts[[i]] + fumblesPts[[i]]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment