add_yardage: Add yardage extracted from play text

Description Usage Arguments Details Value

View source: R/helper_pbp_add_yardage.R

Description

Add yardage extracted from play text

Usage

1
add_yardage(play_df)

Arguments

play_df

(data.frame required) Extracts yardage information from Play-by-Play data frame, as pulled from 'cfb_pbp_data()'

Details

Cleans CFB (D-I) Drive-By-Drive Data to create yardage column. Requires the following columns be present:

play_text

.

play_type

.

rush

.

pass

.

int

.

int_td

.

kickoff_play

.

kickoff_tb

.

kickoff_downed

.

kickoff_fair_catch

.

fumble_vec

.

sack

.

punt

.

punt_tb

.

punt_downed

.

punt_fair_catch

.

punt_oob

.

punt_blocked

.

penalty_detail

.

Value

The original 'play_df' with the following columns appended to it:

yds_rushed

.

yds_receiving

.

yds_int_return

.

yds_kickoff

.

yds_kickoff_return

.

yds_punted

.

yds_fumble_return

.

yds_sacked

.

yds_penalty

.


meysubb/cfbscrapR documentation built on Dec. 15, 2020, 11:26 p.m.