getPartialGamelog: Partial parser for game-log files

Description Usage Arguments Format Value Examples

View source: R/getPartialGamelog.R

Description

Instead of returning the entire file, this function allows the user to choose the columns and date for game-log data.

Usage

1
2
3

Arguments

year

A single four-digit year.

glFields

character. The desired game-log columns. This should be a subset of gamelogFields, and not the entire vector.

date

One of either NULL (the default), or a single four-digit character string identifying the date 'mmdd'

Format

An object of class character of length 161.

Value

Examples

1
2
3
4
5
6
7
## Get Homerun and RBI info for the 2012 season, with park ID

f <- grep("HR|RBI|Park", gamelogFields, value = TRUE)
getPartialGamelog(2012, glFields = f)

## Get Homerun and RBI info for August 25, 2012 - with park ID
getPartialGamelog(glFields=f, date = "20120825")

retrosheet documentation built on Sept. 16, 2021, 9:07 a.m.