batting: Major League Baseball Batting Statistics

battingR Documentation

Major League Baseball Batting Statistics

Description

The batting dataset contains MLB player, salary, and hitting statistics from Sean Lahman's Baseball Database.

Usage

batting

Format

A data frame with 9395 observations on 36 variables. The variables are as follows:

playerID

Unique identifier for each player

yearID

Year data was observed

teamID

Team; a factor

stint

Player's stint (order of appearances within season)

lgID

League; a factor with levels AA AL FL NL PL UA

G

Games: number of games in which a player played

AB

At Bats

R

Runs

H

Hits: times reached base because of a batted, fair ball wihtout error by the defense

X2B

Doubles: hits on which the batter reached second base safely

X3B

Triples: hits on which the batter reached third base safely

HR

Homeruns

RBI

Runs Batted In

SB

Stolen Bases

CS

Caught Stealing

BB

Base on Balls

SO

Strikeouts

IBB

Intentional Walks

HBP

Hit by Pitch

SH

Sacrifice Hits

SF

Sacrifice Flies

GIDP

Grounded into Double Plays

BA

Batting Average

PA

Plate Appearances

TB

Total Bases

SlugPct

Slugging Percentage

OBP

On-Base Percentage

OPS

On-Base Percentage + Slugging

BABIP

Batting Average on Balls in Play

salary

Annual Salary

birthYear

Year a player was born

birthMonth

Month a player was born

nameLast

Player's last name

nameFirst

Player's first name

bats

Player's batting hand

age

Player's age

Details

This dataset combines Lahman's Master, Batting, and Salaries datasets to provide comprehensive batting statistics for each Major League Baseball player. The dataset was reduced to a 15 year time frame (2001-2016) and simplified by removing all incomplete cases.

Author(s)

Shane Ross <saross@wesleyan.edu>

Source

Lahman, S. (2010) Lahman's Baseball Database, 1871-2012, 2012 version, http://www.seanlahman.com/baseball-archive/statistics/.

Examples

summary(batting)

Rkabacoff/qacData documentation built on April 3, 2022, 9:21 a.m.