View source: R/do_reb_off_success.R
do_reb_off_success | R Documentation |
For each team and player, locate the position of offensive rebounds and check if they resulted in scoring points.
do_reb_off_success(data, day_num, game_code, team_sel, verbose)
data |
Play-by-play 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. |
List with two data frames, one for the results for the team (stats_team) and the other for the players (stats_player). The team data frame shows the number of offensive rebounds, the number of those that finished in scoring (and the percentage associated) and the total of points scored. The player data frame shows the player who grabbed the offensive rebound, the player who scored and how many points.
Guillermo Vinue
do_prepare_data_or
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_or(df0, TRUE, acb_games_2223_info)
df2 <- do_reb_off_success(df1, day_num, game_code, "Valencia Basket", FALSE)
#df2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.