| baseball {corrgram} | R Documentation |
The data are for 322 Major Leaque Baseball regular and substitute hitters in 1986.
data(baseball)
A data frame with 322 observations on the following 22 variables.
NameThe hitter/player's name
LeaguePlayer's league (American/National) at the beginning of 1987
TeamPlayer's team at the beginning of 1987
PositionPlayer's position in 1986: 1B (first
base), 2B (second base), 3B (third base), C
(catcher), OF (outfield), DH (designated hitter),
SS (short stop), UT (utility).
AtbatNumber of times at bat in 1986
HitsNumber of hits in 1986
HomerNumber of home runs in 1986
RunsNumber of runs in 1986
RBIRuns batted in during 1986
WalksNumber of walks in 1986
YearsNumber of years in the major leagues
AtbatcNumber of times at bat in his career
HitscNumber of hits in career
HomercNumber of home runs in career
RunscNumber of runs in career
RBIcNumber of Runs Batted In in career
WalkscNumber of walks in career
PutoutsNumber of putouts in 1986
AssistsNumber of assists in 1986
ErrorsNumber of errors in 1986
SalaryAnnual salary (in thousands) on opening day 1987
logSalLog of salary
The levels of the player's positions have been collapsed to fewer levels for a simpler analysis. See the original data for the full list of positions.
The version of the data used to create this data was found at http://euclid.psych.yorku.ca/ftp/sas/sssg/data/baseball.sas.
Michael Friendly analyzed the data in: Corrgrams: Exploratory Displays for Correlation Matrices, The American Statistician, Nov 2002, Vol 56.
The data was originally published for the 1988 ASA Statistical Graphics and Computing Data Exposition: http://lib.stat.cmu.edu/data-expo/1988.html.
The salary data were taken from Sports Illustrated, April 20, 1987. The salary of any player not included in that article is listed as an NA. The 1986 and career statistics were taken from The 1987 Baseball Encyclopedia Update published by Collier Books, Macmillan Publishing Company, New York.
vars2 <- c("Assists","Atbat","Errors","Hits","Homer","logSal",
"Putouts","RBI","Runs","Walks","Years")
corrgram(baseball[,vars2],
lower.panel=panel.shade, upper.panel=panel.pie)