Learn R Programming

baseballr (version 1.6.0)

mlb_team_stats: MLB Team Individual Stats

Description

MLB Team Individual Stats

Usage

mlb_team_stats(
  team_id = NULL,
  stat_type = NULL,
  game_type = NULL,
  stat_group = NULL,
  season = NULL,
  sport_ids = NULL
)

Value

Returns a tibble with the following columns

col_nametypes
seasoncharacter
games_playedinteger
ground_outsinteger
air_outsinteger
runsinteger
doublesinteger
triplesinteger
home_runsinteger
strike_outsinteger
base_on_ballsinteger
intentional_walksinteger
hitsinteger
hit_by_pitchinteger
avgcharacter
at_batsinteger
obpcharacter
slgcharacter
opscharacter
caught_stealinginteger
stolen_basesinteger
stolen_base_percentagecharacter
ground_into_double_playinteger
number_of_pitchesinteger
plate_appearancesinteger
total_basesinteger
rbiinteger
left_on_baseinteger
sac_buntsinteger
sac_fliesinteger
babipcharacter
ground_outs_to_airoutscharacter
catchers_interferenceinteger
at_bats_per_home_runcharacter
team_idinteger
team_namecharacter
team_linkcharacter
type_display_namecharacter
group_display_namecharacter

Arguments

team_id

Team ID to return information and ranking for a particular statistic for a particular team.

stat_type

Stat type to return statistics for.

game_type

Game type to return information for a particular statistic in a particular game type.

stat_group

Stat group to return information and ranking for a particular statistic in a particular group.

season

Year to return information and ranking for a particular statistic in a given year.

sport_ids

The sport_id(s) to return information and ranking information for.

Examples

Run this code
# \donttest{
  try(mlb_team_stats(team_id = 137, stat_type = 'season', stat_group = 'hitting', season = 2021))
# }

Run the code above in your browser using DataLab