combine_run_pass: Combines running and passing plays

Description Usage Arguments Value Examples

View source: R/combine_run_pass.R

Description

The running and passing plays have different formats, so this function puts them in the same format and binds them into one data frame. In addition this function turns the rushing plays that are sacks into passing plays. Then the next play information is added to the play by play. Also the home team and away team is added.

Usage

1
combine_run_pass(runs, pass, games)

Arguments

runs

the "rush.csv" data frame for the years to use to build the model

pass

the "pass.csv" data frame

Value

a data frame containing all rushing and passing plays

Examples

1
2
3
4
5
pass <- readin("pass", 2014)
rush <- readin("rush", 2014)
games <- readin("game", 2014)
game_info <- fix_games(games)
all_plays <- combine_run_pass(rush, pass, game_info)

mattmills49/MELLS documentation built on May 21, 2019, 1:25 p.m.