View source: R/do_time_out_success.R
do_time_out_success | R Documentation |
For each team, locate the position of timeouts and check if they resulted in scoring points.
do_time_out_success(data, day_num, game_code, team_sel, verbose)
data |
Prepared data from a given game. |
day_num |
Day number. |
game_code |
Game code. |
team_sel |
One of the teams' names involved in the game. |
verbose |
Logical. Decide if information of the computations must be provided or not. |
Data frame. This is the meaning of the columns:
day: Day number. game_code: Game code. team: Name of the corresponding team and coach. times_out_requested: Number of timeouts requested in the game. times_out_successful: Number of timeouts that resulted in scoring. times_out_successful_perc: Percentage of successful timeouts. points_scored: Total of points achieved after the timeouts.
Guillermo Vinue
do_prepare_data_to
df0 <- acb_vbc_cz_pbp_2223
day_num <- unique(acb_vbc_cz_pbp_2223$day)
game_code <- unique(acb_vbc_cz_pbp_2223$game_code)
df1 <- do_prepare_data_to(df0, TRUE, acb_games_2223_info, acb_games_2223_coach)
# sort(unique(df1$team))
# "Casademont Zaragoza_Porfirio Fisac" "Valencia Basket_Alex Mumbru"
df2 <- do_time_out_success(df1, day_num, game_code,
"Casademont Zaragoza_Porfirio Fisac", FALSE)
#df2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.