baseball_players1000: Career Information for a Random Sample of 1000 Baseball...

baseball_players1000R Documentation

Career Information for a Random Sample of 1000 Baseball Players

Description

Demographics and position information on 1000 randomly selected baseball players who debuted after 1945.

Usage

data("baseball_players1000")

Format

A data frame with 1000 observations on the following 28 variables.

playerID

a character vector

birthYear

a numeric vector

birthMonth

a numeric vector

birthDay

a numeric vector

birthCountry

a character vector

birthState

a character vector

nameFirst

a character vector

nameLast

a character vector

weight

a numeric vector

height

a numeric vector

bats

a character vector

throws

a character vector

debutYear

a numeric vector

G_all

a numeric vector

G_p

a numeric vector

G_c

a numeric vector

G_1b

a numeric vector

G_2b

a numeric vector

G_3b

a numeric vector

G_ss

a numeric vector

G_lf

a numeric vector

G_cf

a numeric vector

G_rf

a numeric vector

G_of

a numeric vector

G_dh

a numeric vector

G_ph

a numeric vector

G_pr

a numeric vector

pitcher

a logical vector

Details

A random subset of baseball players who debuted after 1945 and played in at least 160 games. Includes information on birth (date and location); height (inches) and weight (pounds); whether they bat left (L), right (R), or switch (B); and games played at each postion. The variable pitcher is a derived variable based on if the majority of games were played as a pitcher (i.e.; G_pr/G_all > 0.5).

Source

https://github.com/chadwickbureau/baseballdatabank

References

https://github.com/chadwickbureau/baseballdatabank/blob/master/readme2014.txt

Examples

data(baseball_players1000)
hist(baseball_players1000$weight,xlab="Weight (lbs)",
     probability=TRUE, ylim=c(0,0.02),
     main="Histogram of Weight for 1000 Baseball Players")
lines(density(baseball_players1000$weight,na.rm=TRUE))


npsm documentation built on Nov. 15, 2023, 1:08 a.m.