generate_substitution_row_from_desc: Given a sentence of substitution data, this function returns...

generate_substitution_row_from_descR Documentation

Given a sentence of substitution data, this function returns a row of substitution data to be insterted into a pbp. This function combines the two functions get_player_ids_from_desc() and generate_substitution_row() to generate a single row of substitution data from a short description of the substition.

Description

Given a sentence of substitution data, this function returns a row of substitution data to be insterted into a pbp. This function combines the two functions get_player_ids_from_desc() and generate_substitution_row() to generate a single row of substitution data from a short description of the substition.

Usage

generate_substitution_row_from_desc(
  desc,
  player_data,
  quarter,
  elapsed_time_in_quarter
)

Arguments

desc

a seneence that describes the substition, be in the format "x enters the game for y"

player_data

a data.frame of player data, as returned by get_player_data()$api_json$players

Value

a 1 row data.frame of substitution data

See Also

Other audit_functions: generate_substitution_row(), get_player_ids_from_desc(), read_boxscore_screen_shot(), remove_pbp()


kburnham/tidynbadata documentation built on Aug. 7, 2024, 12:10 a.m.