Retrieve game linescores for major and minor league games
Source:R/mlb_game_linescore.R
mlb_game_linescore.Rd
Retrieve game linescores for major and minor league games
Value
Returns a tibble with the following columns
col_name | types |
game_pk | numeric |
home_team_id | character |
home_team_name | character |
away_team_id | character |
away_team_name | character |
num | integer |
ordinal_num | character |
home_runs | integer |
home_hits | integer |
home_errors | integer |
home_left_on_base | integer |
away_runs | integer |
away_hits | integer |
away_errors | integer |
away_left_on_base | integer |
home_team_link | character |
home_team_season | character |
home_team_venue_id | character |
home_team_venue_name | character |
home_team_venue_link | character |
home_team_team_code | character |
home_team_file_code | character |
home_team_abbreviation | character |
home_team_team_name | character |
home_team_location_name | character |
home_team_first_year_of_play | character |
home_team_league_id | character |
home_team_league_name | character |
home_team_league_link | character |
home_team_division_id | character |
home_team_division_name | character |
home_team_division_link | character |
home_team_sport_id | character |
home_team_sport_link | character |
home_team_sport_name | character |
home_team_short_name | character |
home_team_record_games_played | character |
home_team_record_wild_card_games_back | character |
home_team_record_league_games_back | character |
home_team_record_spring_league_games_back | character |
home_team_record_sport_games_back | character |
home_team_record_division_games_back | character |
home_team_record_conference_games_back | character |
home_team_record_league_record_wins | character |
home_team_record_league_record_losses | character |
home_team_record_league_record_pct | character |
home_team_record_division_leader | character |
home_team_record_wins | character |
home_team_record_losses | character |
home_team_record_winning_percentage | character |
home_team_franchise_name | character |
home_team_club_name | character |
home_team_all_star_status | character |
home_team_active | character |
away_team_link | character |
away_team_season | character |
away_team_venue_id | character |
away_team_venue_name | character |
away_team_venue_link | character |
away_team_team_code | character |
away_team_file_code | character |
away_team_abbreviation | character |
away_team_team_name | character |
away_team_location_name | character |
away_team_first_year_of_play | character |
away_team_league_id | character |
away_team_league_name | character |
away_team_league_link | character |
away_team_division_id | character |
away_team_division_name | character |
away_team_division_link | character |
away_team_sport_id | character |
away_team_sport_link | character |
away_team_sport_name | character |
away_team_short_name | character |
away_team_record_games_played | character |
away_team_record_wild_card_games_back | character |
away_team_record_league_games_back | character |
away_team_record_spring_league_games_back | character |
away_team_record_sport_games_back | character |
away_team_record_division_games_back | character |
away_team_record_conference_games_back | character |
away_team_record_league_record_wins | character |
away_team_record_league_record_losses | character |
away_team_record_league_record_pct | character |
away_team_record_division_leader | character |
away_team_record_wins | character |
away_team_record_losses | character |
away_team_record_winning_percentage | character |
away_team_franchise_name | character |
away_team_club_name | character |
away_team_all_star_status | character |
away_team_active | character |
Examples
# \donttest{
try(mlb_game_linescore(game_pk = 566001))
#> ── MLB Game Linescore data from MLB.com ───────────── baseballr 1.6.0 ──
#> ℹ Data updated: 2024-04-13 21:56:16 UTC
#> # A tibble: 9 × 95
#> game_pk home_team_id home_team_name away_team_id away_team_name num
#> <dbl> <chr> <chr> <chr> <chr> <int>
#> 1 566001 121 New York Mets 113 Cincinnati Reds 1
#> 2 566001 121 New York Mets 113 Cincinnati Reds 2
#> 3 566001 121 New York Mets 113 Cincinnati Reds 3
#> 4 566001 121 New York Mets 113 Cincinnati Reds 4
#> 5 566001 121 New York Mets 113 Cincinnati Reds 5
#> 6 566001 121 New York Mets 113 Cincinnati Reds 6
#> 7 566001 121 New York Mets 113 Cincinnati Reds 7
#> 8 566001 121 New York Mets 113 Cincinnati Reds 8
#> 9 566001 121 New York Mets 113 Cincinnati Reds 9
#> # ℹ 89 more variables: ordinal_num <chr>, home_runs <int>,
#> # home_hits <int>, home_errors <int>, home_left_on_base <int>,
#> # away_runs <int>, away_hits <int>, away_errors <int>,
#> # away_left_on_base <int>, home_team_all_star_status <chr>,
#> # home_team_link <chr>, home_team_season <chr>,
#> # home_team_venue_id <chr>, home_team_venue_name <chr>,
#> # home_team_venue_link <chr>, home_team_team_code <chr>, …
# }