ncaa_game_logs not working for type = "batting"
kylemckelvey16 opened this issue · 2 comments
Running baseballr 1.5.0, ncaa_game_logs worked for type = "pitching", but not "batting". I tried with multiple player_ids, multiple years, and nothing worked.
This one should work, Cincinnati P Max Bergmann for the 1st player_id, Cincinnati INF Lauden Brooks for the 2nd
try(ncaa_game_logs(player_id = 2493016, year = 2023, type = "pitching", span = "game"))
try(ncaa_game_logs(player_id = 2656295, year = 2023, type = "pitching", span = "game"))
These didn't work for me, same players
try(ncaa_game_logs(player_id = 2493016, year = 2023, type = "batting", span = "game"))
try(ncaa_game_logs(player_id = 2656295, year = 2023, type = "batting", span = "game"))
The pitching data gives me a dataframe of the game-by-game pitching stats like this
The error message is "Invalid arguments provided"
FYI, best I can tell the NCAA changed the heading on the table, changing the following in ncaa_game_logs.R got batting working for me.
batting_cols <- c("Date", "Opponent", "Result",
"G", "R", "AB", "H", "2B", "3B", "TB", "HR", "RBI",
"BB", "HBP", "SF", "SH", "K", "OPP DP", "CS", "Picked",
"SB", "IBB", "RBI2out")
Has anyone gotten this to work? because I'm not sure how to apply @iksullivan's fix above and/or it didn't work for me