getStintStats: Get stats for stints that players were on the floor

View source: R/getStintStats.R

getStintStatsR Documentation

Get stats for stints that players were on the floor

Description

getStintStats parses a play-by-play data frame and returns the statistics while the players were on the court.

Usage

getStintStats(pbp, players, format_long = TRUE)

Arguments

pbp

Play-by-play data frame.

players

Character vector with the players on the court.

format_long

Logical scalar indicating how output data frame should be returned (defaults to TRUE).

Value

Data frame with stats on offense and defense when players were on the court. If format_long = TRUE there will be two rows per game: one for offense and one for defense. If format_long = FALSE offense and defense stats for each game will be on the same row.


ponelplay/test documentation built on April 14, 2022, 12:43 a.m.