Learn R Programming

Lahman (version 2.0-1)

playerInfo: Lookup Information for Players and Teams

Description

These functions use grep to lookup information about players (from the Master file) and teams (from the Teams file).

Usage

playerInfo(playerID, nameFirst, nameLast, data = Master, extra = NULL, ...)

teamInfo(teamID, name, data = Teams, extra = NULL, ...)

Arguments

playerID
pattern for playerID
nameFirst
pattern for first name
nameLast
pattern for last name
data
The name of the dataset to search
extra
A character vector of other fields to include in the result
...
other arguments passed to grep
teamID
pattern for teamID
name
pattern for team name

Value

  • Returns a data frame for unique matching rows from data

See Also

grep, ~~~

Examples

Run this code
playerInfo("aaron")

  teamInfo("CH", extra="park")

Run the code above in your browser using DataLab