do_offensive_fouls: Compute offensive fouls

View source: R/do_offensive_fouls.R

do_offensive_foulsR Documentation

Compute offensive fouls

Description

Compute how many offensive fouls has committed or received every player.

Usage

do_offensive_fouls(data, type)

Arguments

data

Play-by-play data.

type

Either 'comm' (for committed) or 'rec' (for received).

Value

Data frame with the following columns:

team: Name of the team. player: Name of the player. n_offensive_fouls_x: Number of offensive fouls.

Author(s)

Guillermo Vinue

Examples

df01 <- do_offensive_fouls(acb_vbc_cz_pbp_2223, "comm")
#df01

df02 <- do_offensive_fouls(acb_vbc_cz_pbp_2223, "rec")
#df02


BAwiR documentation built on Nov. 14, 2023, 5:08 p.m.