Learn R Programming

BasketballAnalyzeR (version 0.5.0)

PbPmanipulation: Adapts the standard file supplied by BigDataBall to the format required by BasketballAnalyzeR

Description

Adapts the standard file supplied by BigDataBall to the format required by BasketballAnalyzeR

Usage

PbPmanipulation(data)

Arguments

data

a play-by-play data frame supplied by BigDataBall.

Value

A play-by-play data frame.

The data frame generated by PbPmanipulation has the same variables of PbP.BDB (when necessary, coerced from one data type to another, e.g from factor to numeric) plus the following five additional variables:

  • periodTime, time played in the quarter (in seconds)

  • totalTime, time played in the match (in seconds)

  • playlength, time since the immediately preceding event (in seconds)

  • ShotType, type of shot (FT, 2P, 3P)

  • oppTeam, name of the opponent team

References

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

See Also

PbP.BDB

Examples

Run this code
# NOT RUN {
PbP <- PbPmanipulation(PbP.BDB)
# }

Run the code above in your browser using DataLab