-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
statcast_search has broken due to batspeed and swing length being added #337
Comments
it also fails on this function: |
Download the dev version with |
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 am having the same issue. Would appreciate any possible help! |
Did you install with |
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: When I run the next line, |
Its happening again : Error in setnames(x, value) : and the dev installation method didn't help so far |
This wont work because |
Alright gang, I made a bad, janky fix for this issue that will act as a stopgap before the package is actually updated. It works by taking unaccounted-for columns and just calling them "newStat". I make no guarantees that it doesn't just ruin other functionalities of the package, but it will get you what you need in the meantime. I'd love to make a cleaner fix but this is a hobby not my job lol. Run 'devtools::install_github("mlascaleia/baseballr")' in a new R session to install. This will overwrite your current version of baseballr and will not receive any updates that baseballr receives |
That works beautifully. Thank you very much for your efforts!!! |
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
The text was updated successfully, but these errors were encountered: