Closed rdelrossi closed 1 year ago
There's a typo in the url that the function is trying to pull data from, which is causing the issue. The intended behavior is to work similarly to fg_team_pitching()
and return pitching statistics aggregated by team, but the typo is causing it to pull individual data (like fg_batter_leaders()
.
Thanks for letting us know!
Great! Thanks for the quick update. I applied your changes and can confirm that it now works as intended (by team).
Unless I'm missing something, the new
fg_team_batter()
function doesn't return the player's name (or age in the case of split seasons). The issue seems to be in lines 327 (leaders <- leaders[,-2]
) and 390 (leaders <- leaders[,-c(3,5)]
).Dropping these two lines means adjusting the code at lines 335 (increase each index by 1) and 398 (increase each index by 2).