Last chance! 50% off unlimited learning
Sale ends in
Compute how many offensive fouls has committed or received every player.
do_offensive_fouls(data, type)
Data frame with the following columns:
team: Name of the team. player: Name of the player. n_offensive_fouls_x: Number of offensive fouls.
Play-by-play data.
Either 'comm' (for committed) or 'rec' (for received).
Guillermo Vinue
df01 <- do_offensive_fouls(acb_vbc_cz_pbp_2223, "comm")
#df01
df02 <- do_offensive_fouls(acb_vbc_cz_pbp_2223, "rec")
#df02
Run the code above in your browser using DataLab