TOPboxes: Calculate Tbox, Obox and Pbox

View source: R/TOPboxes.r

TOPboxesR Documentation

Calculate Tbox, Obox and Pbox

Description

Calculate Tbox, Obox and Pbox

Usage

TOPboxes(data, team)

Arguments

data

a play-by-play data frame

team

character, team

Value

A list with the following elements

  • Tbox, (completare descrizione)

  • Obox, (completare descrizione)

  • Pbox, (completare descrizione)

Author(s)

Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)

References

P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.

See Also

PbPmanipulation

Examples

library(operators)
library(dplyr)
PbP <- PbPmanipulation(PbP.BDB)
PbP <- PbP %>%
  mutate(oreb = type %~% "rebound offensive",
         dreb = type %~% "rebound defensive",
                turnover = event_type=="turnover",
                PF = (event_type == "foul") & !(type %~% "technical") ) %>%
        mutate(across(c(player, assist, steal, block, h1:h5, a1:a5), as.character)) %>%
 as.data.frame()
out <- TOPboxes(PbP, team="GSW")

sndmrc/BasketAnalyzeR documentation built on June 6, 2023, 12:52 a.m.