playerInfo.RdThese functions use grep to lookup information about players
(from the People file)
and teams (from the Teams file).
pattern for playerID
pattern for first name
pattern for last name
The name of the dataset to search
A character vector of other fields to include in the result
other arguments passed to grep
pattern for teamID
pattern for team name
Returns a data frame for unique matching rows from data
grep, ~~~
playerInfo("aaron")
#> playerID nameFirst nameLast
#> 2 aaronha01 Hank Aaron
#> 3 aaronto01 Tommie Aaron
teamInfo("CH", extra="park")
#> teamID name park
#> 552 CHN Chicago White Stockings 23rd Street Grounds
#> 701 CHF Chicago Chi-Feds Wrigley Field
#> 703 CHP Chicago Pirates <NA>
#> 704 CHA Chicago White Sox South Side Park II
#> 1113 CH1 Chicago White Stockings Union Base-Ball Grounds
#> 1114 CH2 Chicago White Stockings 23rd Street Grounds
#> 1154 CHU Chicago/Pittsburgh (Union League) <NA>