do_clutch_time: Get games with clutch time

View source: R/do_clutch_time.R

do_clutch_timeR Documentation

Get games with clutch time

Description

Obtain the games that have clutch time. The clutch time is generally defined as the game situation when the scoring margin is within 5 points with five or fewer minutes remaining in a game. In order to allow more clutch situations, the user will be able to set the minutes left and the scoring difference.

Usage

do_clutch_time(data, min_left = "05:00", score_diff = 5)

Arguments

data

Source play-by-play data.

min_left

Minutes left to finish the game. Default 5 minutes.

score_diff

Scoring difference. Default 5 points.

Value

Data frame of the game that has clutch time.

Author(s)

Guillermo Vinue

Examples

df0 <- do_clutch_time(acb_vbc_cz_pbp_2223)
#df0 # If no rows, that means that the game did not have clutch time.


BAwiR documentation built on Feb. 27, 2026, 5:07 p.m.