BillPetti / baseballr

A package written for R focused on baseball analysis. Currently in development.
billpetti.github.io/baseballr
Other
356 stars 98 forks source link

Function arent working #310

Open benjieng4 opened 10 months ago

benjieng4 commented 10 months ago

I have been trying to use the function "fg_batting_leaders" for my projects. However, I get the following error message on Rstudio

"Error in fg_batting_leaders(x = 2022, y = 2022, qual = 200) : could not find function "fg_batting_leaders"

I got a new computer and on my old computer everything was working fine. This function and the pitcher function won't work.

Any suggestions?

ryanb519 commented 10 months ago

I'm getting something similar: Error in fg_bat_leaders(x = 2023, y = 2023, qual = 1, ind = 1) : object 'leaders' not found).

FanGraphs just made a bunch of changes to their leaderboards (https://blogs.fangraphs.com/weve-updated-our-major-league-leaderboards-interface/), so I assume this broke the fg-related functions in BaseballR :/

rdelrossi commented 5 months ago

@benjieng4, try fg_batter_leaders(startseason = 2022, endseason = 2022, qual = 200).

saiemgilani commented 5 months ago

@benjieng4, try fg_batter_leaders(startseason = 2022, endseason = 2022, qual = 200).

correct, but this is a new change in baseballr version 1.6.0 (soon to be pushed to CRAN, in the meanwhile run):

remotes::install_github("BillPetti/baseballr")

then restart your R session and try with the quoted command