Open mlascaleia opened 1 month ago
it also fails on this function: scrape_statcast_savant_pitcher
is there a work around that can be applied, similar to the above?
Download the dev version with devtools::install_github("BillPetti/baseballr")
and this should be fixed!
Thanks for updating! I do want to note with the fix that was implemented the code will still break in the same way if the statcast tibbles are not exactly 94 columns from here on out. Just something worth noting!
Yep! We're going to add a more permanent fix, but wanted to get the hotfix out asap once the switch was made.
Thanks!
thanks for the update!
I reinstalled and am still getting the same column number error. I even did force = TRUE to make sure I got the newest version. Anything else I can try?
I reinstalled and am still getting the same column number error. I even did force = TRUE to make sure I got the newest version. Anything else I can try?
I am having the same issue. Would appreciate any possible help!
Did you install with install.packages("baseballr")
or devtools::install_github("BillPetti/baseballr")
?
I used devtools::install_github("BillPetti/baseballr"), then to load in the library it is library(baseballr) correct?
Yep! Did you restart your R session between installing and then using the package?
I believe I got it, thank you so much!
Thanks so much for sharing this. Can you please explain how I would work this fix into the following line of code: Season_Data <- scrape_statcast_savant_batter_all(start_date = "2023-09-27", end_date = "2023-10-01")
When I run the next line, colNumber <- ncol(payload) I get the following error: Error in ncol(payload) : object 'payload' not found
The tibbles exported from statcast used to have 92 columns, now they have 94!
I foresee this being a continuous error as more and more stats are added. Here is my suggested fix to turn this into something that throws a warning instead of breaking the package:
This way the function will still work when new stats are added, and their names can be updated whenever you update the package