extract_shots: Extract Shots from SportVU Data

Description Usage Arguments

View source: R/extract_shots.R

Description

Extract all field goals from the SportVU data frame within a certain time margin of the field goal occuring.

Usage

1
extract_shots(obj, pbp, margin = c(3, 3))

Arguments

obj

A data frame returned from sportvu_df.

pbp

Play-by_play data frame (e.g. an object returned by get_pbp). One of the columns must contain the PCTIMESTRING variable.

margin

Margin around the game clock for each (shot) event. A vector of length two with the first element indicating how far back to go and the second element indicating how far forward to go (in seconds).


imadmali/NBAsportvu documentation built on May 17, 2019, 9:12 a.m.