I'm trying to find the number of hits and runs the Mets had in each game of 2022 (and then possibly extend that to each team in baseball game-by-game). I have the runs, but finding the hits isn't working.
For the runs, I used bref_team_results('NYM', 2022)
.
For the hits, I'd want to use mlb_game_linescore()
, but it asks for the game_pk as a variable. When I try to find game_pks, it's throwing me the following error:
get_game_pks_mlb('04-10-2022', level_ids = 1)
Invalid arguments provided
Error in get_game_pks_mlb("04-10-2022", level_ids = 1) :
object 'payload' not found
Does anyone know why this is happening or have an alternative suggestion for how to get the game-by-game hit results for each team?