streak_data: Obtain binary data for streak analysis

View source: R/streak_data.R

streak_dataR Documentation

Obtain binary data for streak analysis

Description

Extracts batting data from Retrosheet for a specific player and specific event

Usage

streak_data(pbpdata, pid, eventcode, AB=FALSE)

Arguments

pid

Retroid of player

pbpdata

Retrosheet event file for a particular season or seasons

eventcode

Code(s) for variable EVENT_CD that indicates event (can use "H", "HR", "SO", "OB", or sets of numeric codes)

AB

Should one only consider official at-bats?

Value

vector of 0-1 data for all plate appearances in time

Author(s)

Jim Albert


bayesball/BayesTestStreak documentation built on April 28, 2024, 6:28 a.m.