Learn R Programming

corrgram (version 1.3)

baseball: Baseball Hitter's Data

Description

The data are for 322 Major Leaque Baseball regular and substitute hitters in 1986.

Usage

data(baseball)

Arguments

source

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. Online at: http://www.math.yorku.ca/SCS/Papers/corrgram.pdf.

Details

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.

References

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.

Examples

Run this code
data(baseball)

vars2 <- c("Assists","Atbat","Errors","Hits","Homer","logSal",
           "Putouts","RBI","Runs","Walks","Years")
corrgram(baseball[,vars2],
         lower.panel=panel.shade, upper.panel=panel.pie)

Run the code above in your browser using DataLab