FantasyFootballAnalytics / FantasyFootballAnalyticsR

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

Cannot find playerId object #38

Closed egaffincahn closed 4 years ago

egaffincahn commented 7 years ago

Hi, I believe a commenter on the package website had a similar issue. In a call to getProjections(), I get the error object 'playerId' not found. I've stripped down my code so that all I run upon startup is:

library("ffanalytics") scrapeData <- runScrape(week = 1, season = 2016, analysts = 4, positions = c("QB")) myProjections <- getProjections(scrapeData, leagueScoring = scoringRules)

It scrapes the data successfully, but dies getting the projections during or after the Retrieving overall ECR ranks stage. A playerId variable is indeed one of the elements of the resultData class in my scrapeData list. playerId also exists as a character vector in playerData, but changing this to numeric type (as it is in my scrapeData) did not solve the issue. Including other input arguments for getProjections() did not change anything.

I'm using R 3.3.1, R Studio 0.99.903, and ffanalytics 0.1.7. Any suggestions for how to move forward would be appreciated.

Thanks!

williamaue commented 7 years ago

I'm suspect that I'm having the same issue. The getProjections() function works for me if the scraped data are for the season projections (i.e., week = 0), but the function fails at Retrieving overall ECR ranks when I run it on data scraped for week 1. The error code that I'm getting is: Error in bmerge(i, x, leftcols, rightcols, io, xo, roll, rollends, nomatch, : typeof x.player (logical) != typeof i.player (character)

I'm running R 3.2.3, RStudio 0.99.893, and ffanalytics 0.1.8.

egaffincahn commented 7 years ago

Yep, after updating to ffanalytics 0.1.8, I now get the same error you do.

Edit: These people seem to be having a similar issue.

MrDAndersen commented 7 years ago

This should be fixed now. Please update to version 0.1.9

egaffincahn commented 7 years ago

Thanks for the reply. I updated, and it moves past the ECR ranks fine, but now has trouble at a downstream step: The GUI that opens during getProjections() shows no players and upon closing, the console reads Weekly overall rankings not available. The scrapeData from runScrape() which I'm using for getProjections() does in fact have all the numeric data.

Thanks!

je64u commented 7 years ago

I can confirm that getProjections() is not showing any players with 0.1.9 for weekly projections

isaactpetersen commented 4 years ago

See the latest version of the app here: https://github.com/FantasyFootballAnalytics/ffanalytics