Learn R Programming

baseballr (version 2.0.0)

playername_lookup: Look up Baseball Player Name by ID

Description

This function allows you to query the Chadwick Bureau's public register of baseball players and the various IDs associated with them in different systems of record.

Usage

playername_lookup(id)

Value

A data frame of baseball players and the various IDs associated with them in different systems of record.

col_nametypesdescription
name_firstcharacterPlayer first name.
name_lastcharacterPlayer last name.
name_givencharacterPlayer full given (legal) name.
name_suffixcharacterName suffix (e.g. Jr., Sr., III).
name_nickcharacterPlayer nickname.
birth_yearintegerYear of birth.
mlb_played_firstintegerFirst MLB season as a player.
key_mlbamintegerMLB Advanced Media (MLBAM) player ID.
key_retrocharacterRetrosheet player ID.
key_bbrefcharacterBaseball-Reference player ID.
key_fangraphsintegerFanGraphs player ID.

Arguments

id

An integer or character string representing a player ID in a baseball database, cross-referenced through the Chadwick Bureau's public register of baseball players.

Examples

Run this code
# \donttest{
  try(playername_lookup(4885))
  try(playername_lookup("kaaihki01"))
# }

Run the code above in your browser using DataLab