get_4th_plays {nfl4th} | R Documentation |
Get 4th down plays from a game
Description
Get 4th down plays from a game.
Usage
get_4th_plays(gid)
Arguments
gid |
A game to get 4th down decisions of. |
Details
Obtains a data frame that can be used with add_4th_probs()
. The following columns
must be present:
game_id : game ID in nflfastR format (eg '2020_20_TB_GB')
Value
Original data frame Data frame plus the following columns added:
- desc
Play description from ESPN.
- type_text
Play type text from ESPN.
- index
Index number of play from a given game. Useful for tracking plays (e.g. for 4th down bot).
- The rest
All the columns needed for
add_4th_probs().
Examples
plays <- nfl4th::get_4th_plays('2020_20_TB_GB')
dplyr::glimpse(plays)
[Package nfl4th version 1.0.4 Index]