MLB Teams Stats
mlb_teams_stats(
stat_type = NULL,
game_type = NULL,
stat_group = NULL,
season = NULL,
sport_ids = NULL,
sort_stat = NULL,
order = NULL
)
Returns a tibble with the following columns
col_name | types |
total_splits | integer |
season | character |
rank | integer |
games_played | integer |
ground_outs | integer |
air_outs | integer |
runs | integer |
doubles | integer |
triples | integer |
home_runs | integer |
strike_outs | integer |
base_on_balls | integer |
intentional_walks | integer |
hits | integer |
hit_by_pitch | integer |
avg | character |
at_bats | integer |
obp | character |
slg | character |
ops | character |
caught_stealing | integer |
stolen_bases | integer |
stolen_base_percentage | character |
ground_into_double_play | integer |
number_of_pitches | integer |
plate_appearances | integer |
total_bases | integer |
rbi | integer |
left_on_base | integer |
sac_bunts | integer |
sac_flies | integer |
babip | character |
ground_outs_to_airouts | character |
catchers_interference | integer |
at_bats_per_home_run | character |
team_id | integer |
team_name | character |
team_link | character |
splits_tied_with_offset | list |
splits_tied_with_limit | list |
type_display_name | character |
group_display_name | character |
Stat type to return statistics for.
Game type to return information for a particular statistic in a particular game type.
Stat group to return information and ranking for a particular statistic in a particular group.
Year to return information and ranking for a particular statistic in a given year.
The sport_id(s) to return information and ranking information for.
Sort return based on stat.
Order return based on either desc or asc.
# \donttest{
try(mlb_teams_stats(stat_type = 'season', stat_group = 'hitting', season = 2021))
# }
Run the code above in your browser using DataLab