Learn R Programming

BAwiR (version 1.4.2)

do_shots_stats: Shots statistics

Description

Compute both the total and by zone two-point and threes statistics.

Usage

do_shots_stats(data_filter, data_shots_zones)

Value

A list with the following three elements:

  • all_shots: Shooting data frame associated with the filters given to the function.

  • summary_shots: Summary of the shots as a whole.

  • summary_shots_zone: Summary of the shots by zone.

Arguments

data_filter

Shooting filtered data obtained with do_filter_data.

data_shots_zones

Shooting data with the court zones.

Author

Guillermo Vinue

See Also

do_divide_court_zones, do_filter_data

Examples

Run this code
if (FALSE) {
df0 <- do_divide_court_zones(acb_shooting_data_2425)

df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "")

shots_stats <- do_shots_stats(df1, df0) 

all_shots <- shots_stats$all_shots

summary_shots <- shots_stats$summary_shots

summary_shots_zone <- shots_stats$summary_shots_zone
}

Run the code above in your browser using DataLab