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

battingLabels

Variable Labels


Description

These data frames provide descriptive labels for the variables in the Batting, Pitching and Fielding files (and related *Post files). They are useful for plots and other output using Label.

Usage

data(battingLabels)

data(fieldingLabels)

data(pitchingLabels)

Format

Each is data frame with observations on the following 2 variables.

variable

variable name

label

variable label

See Also

Examples

data(battingLabels)
str(battingLabels)

require("dplyr")

# find and plot maximum number of homers per year
batHR <- Batting %>%
           filter(!is.na(HR)) %>%
           group_by(yearID) %>%
           summarise(max=max(HR))
		
with(batHR, {
  plot(yearID, max, 
       xlab=Label("yearID"), ylab=paste("Maximum", Label("HR")), 
       cex=0.8)
  lines(lowess(yearID, max), col="blue", lwd=2)
  abline(lm(max ~ yearID), col="red", lwd=2)
	})

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.