Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

playerInfo

Lookup Information for Players and Teams


Description

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

Usage

playerInfo(playerID, nameFirst, nameLast, data = Lahman::People, extra = NULL, ...)

teamInfo(teamID, name, data = Lahman::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

Author(s)

Michael Friendly

See Also

grep, ~~~

Examples

playerInfo("aaron")

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

Lahman

Sean 'Lahman' Baseball Database

v10.0-1
GPL
Authors
Michael Friendly [aut], Chris Dalzell [cre, aut], Martin Monkman [aut], Dennis Murphy [aut], Vanessa Foot [ctb], Justeena Zaki-Azat [ctb], Sean Lahman [cph]
Initial release
2022-04-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.