pitches: Sample PITCHf/x Data Set

pitchesR Documentation

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

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

#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)

cpsievert/pitchRx documentation built on Aug. 19, 2023, 10:02 p.m.