FantasyFootballAnalytics / FantasyFootballAnalyticsR

R scripts and data files for the Fantasy Football Analytics website
http://fantasyfootballanalytics.net/
447 stars 1.58k forks source link

ESPN Projections Overall and Position Ranks Not Applied Correctly #13

Closed bpafoshizle closed 8 years ago

bpafoshizle commented 8 years ago

I'm running R version 3.1.2 (2014-10-31) on x86_64-apple-darwin13.4.0.

It looks like the cause is the order function is sorting characters, rather than numerics, so at some point, the as.numeric function needs to be applied to the points field. See line 129 and 132 of the "ESPN Projections.R" file.

Simple solution: projections_espn <- projections_espn[order(-as.numeric(points))][,overallRank := 1:.N]

This problem is causing Geno Smith to be ranked the top QB. :)

isaactpetersen commented 8 years ago

We're currently working on the Auction tool so we haven't been able to keep the scripts on the repo up-to-date. This is on our to-do list, though: Issue https://github.com/dadrivr/FantasyFootballAnalyticsR/issues/11. Thanks!

-Isaac

isaactpetersen commented 8 years ago

This is fixed with our new ffanalytics R package: http://fantasyfootballanalytics.net/2016/06/ffanalytics-r-package-fantasy-football-data-analysis.html

Thanks! -Isaac