Learn R Programming

pitchRx (version 1.8.2)

pitches: Sample PITCHf/x Data Set

Description

Every four-seam and cutting fastball thrown by Mariano Rivera and Phil Hughes during the 2011 season.

Usage

pitches

Arguments

Format

A data frame with variables from the 'atbat' and 'pitch' tables.

See Also

http://fastballs.wordpress.com/2007/08/02/glossary-of-the-gameday-pitch-fields/

Examples

Run this code
#This can reproduce data(pitches), but it takes a while...
## Not run: 
# data <- scrape(start="2011-01-01", end="2011-12-31")
# names <- c("Mariano Rivera", "Phil Hughes")
# atbats <- subset(data$atbat, pitcher_name %in% names)
# pitchFX <- plyr::join(atbats, data$pitch, by=c("num", "url"), type="inner")
# pitches <- subset(pitchFX, pitch_type %in% c("FF", "FC"))
# ## End(Not run)

Run the code above in your browser using DataLab