Title: | Advanced Basketball Statistics |
---|---|
Description: | Provides different functionalities and calculations used in the world of basketball to analyze the statistics of the players, the statistics of the teams, the statistics of the quintets and the statistics of the plays. For more details of the calculations included in the package can be found in the book Basketball on Paper written by Dean Oliver. |
Authors: | Francisco Javier Cantero [aut, cre], Juan Jose Cuadrado [aut], Universidad de Alcala de Henares [aut] |
Maintainer: | Francisco Javier Cantero <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.1 |
Built: | 2024-10-31 22:09:42 UTC |
Source: | CRAN |
This function allows the calculation of advanced individual statistics.
individuals_advance_stats(df1, df2, df3)
individuals_advance_stats(df1, df2, df3)
df1 |
Should be a Data Frame that represents the individual statistics or individual defensive statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
df2 |
Should be a Data Frame that represents the team's statistics. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame that represents the rival's statistics. The parameter has to be in the format provided by the team_stats() function. |
Data frame with the following advanced statistics calculated:
Player Efficiency Rating (PER)
Efficiency Field Goals percentage (eFG%)
True shooting percentage (TS%)
Three rating (3Par)
Free Throw rating (FTr)
Offensive rebounds percentage (ORB%)
Defensive rebounds percentage (DRB%)
Total rebounds percentage (TRB%)
Assists percentage (AST%)
Steal percentage (STL%)
Block percentage (BLK%)
Turnover percentage (TOV%)
Usage percentage (USG%)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_advance_stats(df1,df2,df3)
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_advance_stats(df1,df2,df3)
The function transform the statistics entered for later use in the rest of the functions that apply to individuals statistics.
individuals_data_adjustment(df1)
individuals_data_adjustment(df1)
df1 |
Should be a Data Frame that represents the individual statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
The data.frame must have the same columns and these represent the same as in the example.
The input data.frame must have the last row that represents the team's statistics.
The function allows the transformation of the individual's statistics to which the shooting percentages and the number of total rebounds are added.
The function allows the transformation of the defensive statistics to which the force missed shot and the forced turnovers.
Data.frame with the transformed statistics for use in the rest of the functions.
The data frame obtained for the individual's statistics will have the following format:
Name of the player (Name)
Games played (G)
Games Started (GS)
Minutes Played (MP)
Field Goals Made (FG)
Field Goals Attempted (FGA)
Field Goals Percentage (FG%)
Three Points Made (3P)
Three Points Attempted (3PA)
Three Points Percentage (3P
Two Points Made (2P)
Two Points Attempted (2PA)
Two Points Percentage (2P%)
Free Throw Made (FT)
Free Throw Attempted (FTA)
Free Throw Percentage (FT%)
Offensive Rebounds (ORB)
Defensive Rebounds (DRB)
Total Rebounds (TRB)
Assists (AST)
Steals (STL)
Blocks (BLK)
Turnover (TOV)
Personal Fouls (PF)
Points (PTS)
Plus Minus (+/-)
The data frame obtained for the defensive individual's statistics will have the following format:
Name of the player (Name)
Minutes Played (MP)
Defensive Rebounds (DRB)
FGA by opposing team (FM)
Blocks (BLK)
(TOTAL FM)
Forced turnover(FTO)
Steals (STL)
Total forced turnover (TOTAL FTO)
FTA by opposing team (FFTA)
FG made by opposing team (DFGM)
FT made by opposing team (DFTM)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,1), "FG" = c(643,0), "FGA" = c(1303,0),"3P " = c(148,0), "3PA" = c(425,0),"2P" = c(495,0), "2PA" = c(878,0), "FT" = c(264,0), "FTA" = c(381,0),"ORB" = c(66,0), "DRB" = c(459,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0),"TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) individuals_data_adjustment(df1) df2 <- data.frame("Name" = c("Witherspoon ","Team"), "MP" = c(14,200), "DREB" = c(1,0),"FM" = c(4,0), "BLK" = c(0,0),"FTO" = c(0,0), "STL" = c(1,1), "FFTA" = c(0,0), "DFGM" = c(1,0), "DFTM" = c(0,0)) individuals_data_adjustment(df2)
df1 <- data.frame("Name" = c("James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,1), "FG" = c(643,0), "FGA" = c(1303,0),"3P " = c(148,0), "3PA" = c(425,0),"2P" = c(495,0), "2PA" = c(878,0), "FT" = c(264,0), "FTA" = c(381,0),"ORB" = c(66,0), "DRB" = c(459,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0),"TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) individuals_data_adjustment(df1) df2 <- data.frame("Name" = c("Witherspoon ","Team"), "MP" = c(14,200), "DREB" = c(1,0),"FM" = c(4,0), "BLK" = c(0,0),"FTO" = c(0,0), "STL" = c(1,1), "FFTA" = c(0,0), "DFGM" = c(1,0), "DFTM" = c(0,0)) individuals_data_adjustment(df2)
The function allows the calculation of individual defensive actual statistics on court
individuals_defensive_actual_floor_stats(df1, df2, df3)
individuals_defensive_actual_floor_stats(df1, df2, df3)
df1 |
Should be a Data Frame that represents the individual defensive statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
df2 |
Should be a Data Frame that represents the team's statistics. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame that represents the rival's statistics. The parameter has to be in the format provided by the team_stats() function. |
Data frame with the following individual defensive actual statistics
Defensive Stops (DStops)
Defensive Scores Possesions (DscPoss)
Defensive Possesions (DPoss)
Stops percentage (STOPS%)
(TMDPossS%)
Defensive Rating (DRtg)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("Witherspoon ","Team"), "MP" = c(14,200), "DREB" = c(1,0), "FM" = c(4,0), "BLK" = c(0,0),"TOTAL FM" = c(4,0), "FTO" = c(0,0),"STL" = c(1,1), "TOTAL FTO " = c(1,0), "FFTA" = c(0,0), "DFGM" = c(1,0), "DFTM" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_defensive_actual_floor_stats(df1,df2,df3)
df1 <- data.frame("Name" = c("Witherspoon ","Team"), "MP" = c(14,200), "DREB" = c(1,0), "FM" = c(4,0), "BLK" = c(0,0),"TOTAL FM" = c(4,0), "FTO" = c(0,0),"STL" = c(1,1), "TOTAL FTO " = c(1,0), "FFTA" = c(0,0), "DFGM" = c(1,0), "DFTM" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_defensive_actual_floor_stats(df1,df2,df3)
The function allows the calculation of individual defensive estimated statistics on court
individuals_defensive_estimated_floor_stats(df1, df2, df3)
individuals_defensive_estimated_floor_stats(df1, df2, df3)
df1 |
Should be a Data Frame. The parameter has to be in the format provided by the data_adjustment() function. |
df2 |
Should be a Data Frame. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame. The parameter has to be in the format provided by the team_stats() function. |
Data frame with the following individual defensive estimated statistics
Defensive Stops (DStops)
Stops percentage (STOPS%)
floor percentage (Floor%)
Defensive Rating (DRtg)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_defensive_estimated_floor_stats(df1,df2,df3)
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_defensive_estimated_floor_stats(df1,df2,df3)
The function allows to perform the sums of two data.frames with the same format adopted after being transformed by individuals_data_adjustment() function,
individuals_games_adder(df1, df2)
individuals_games_adder(df1, df2)
df1 |
Should be a Data Frame that represents the first set of individual statistics or defensive individual statistics of the players. It has to be in the format provided by the individuals_data_adjustment() function |
df2 |
Should be a Data Frame that represents the second set of individual statistics or defensive individual statistics of the players. It has to be in the format provided by the individuals_data_adjustment() function |
The function will work correctly when the name of the players is the same, in case it is different it will take the players as different.
Data frame with the sum of the statistics of the other two entered data.frame.
df1 <- data.frame("name" = c("LeBron James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,0), "FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0), "3P" = c(148,0), "3PA" = c(425,0), "Percentage 3P" = c(0.348,0), "2P" = c(495,0), "2PA" = c(878,0), "Percentage 2P" = c(0.564,0), "FT" = c(264,0), "FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0), "DRB" = c(459,0), "TRB" = c(525,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0), "TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) df2 <- data.frame("name" = c("LeBron James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,0), "FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0), "3P" = c(148,0), "3PA" = c(425,0), "Percentage 3P" = c(0.348,0), "2P" = c(495,0), "2PA" = c(878,0), "Percentage 2P" = c(0.564,0), "FT" = c(264,0), "FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0), "DRB" = c(459,0), "TRB" = c(525,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0), "TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) individuals_games_adder(df1,df2)
df1 <- data.frame("name" = c("LeBron James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,0), "FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0), "3P" = c(148,0), "3PA" = c(425,0), "Percentage 3P" = c(0.348,0), "2P" = c(495,0), "2PA" = c(878,0), "Percentage 2P" = c(0.564,0), "FT" = c(264,0), "FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0), "DRB" = c(459,0), "TRB" = c(525,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0), "TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) df2 <- data.frame("name" = c("LeBron James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,0), "FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0), "3P" = c(148,0), "3PA" = c(425,0), "Percentage 3P" = c(0.348,0), "2P" = c(495,0), "2PA" = c(878,0), "Percentage 2P" = c(0.564,0), "FT" = c(264,0), "FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0), "DRB" = c(459,0), "TRB" = c(525,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0), "TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) individuals_games_adder(df1,df2)
The function allows the calculation of individual's offensive statistics on court
individuals_ofensive_floor_stats(df1, df2, df3)
individuals_ofensive_floor_stats(df1, df2, df3)
df1 |
Should be a Data Frame that represents the individual statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
df2 |
Should be a Data Frame that represents the team's statistics. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame that represents the rival's statistics. The parameter has to be in the format provided by the team_stats() function. |
Data frame with the following individual's offensive statistics
Score possessions (Sc. Poss)
Possessions attacked (Poss)
floor percentage (Floor%)
Offensive Rating (ORtg)
Point produced per game (Pts Prod/G)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_ofensive_floor_stats(df1,df2,df3)
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) individuals_ofensive_floor_stats(df1,df2,df3)
The function allows the calculation of individual statistics per game.
individuals_stats_per_game(df1)
individuals_stats_per_game(df1)
df1 |
Should be a Data Frame that represents the individual statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
The calculation is made with the number of games played by the player.
Data frame with individual statistics per game
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) individuals_stats_per_game(df1)
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) individuals_stats_per_game(df1)
The function allows the calculation of the statistics per game projected to M minutes.
individuals_stats_per_minutes(df1, m)
individuals_stats_per_minutes(df1, m)
df1 |
Should be a Data Frame that represents the individual statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
m |
Should be a number. This parameter has to be the number of minutes to which you want to project the statistics. |
The statistical projection is made from the relationship between the number of minutes entered and the number of minutes played by the player.
Data frame with statistics by game projected to the minutes entered.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) m <- 48 individuals_stats_per_minutes(df1,m)
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) m <- 48 individuals_stats_per_minutes(df1,m)
The function allows the calculation of the statistics per game projected to P possesions.
individuals_stats_per_possesion(df1, df2, df3, p, m)
individuals_stats_per_possesion(df1, df2, df3, p, m)
df1 |
Should be a Data Frame that represents the individual statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
df2 |
Should be a Data Frame that represents the team's statistics. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame that represents the rival's statistics. The parameter has to be in the format provided by the team_stats() function. |
p |
Should be a number. This parameter has to be the number of possessions to which you want to project the statistics. |
m |
should be a number. This parameter has to be the duration of a single game. |
The statistical projection is made from the estimation of the possessions that the team plays when the player is on the court.
Data frame with statistics by game projected to the possessions entered
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p <- 100 m <- 48 individuals_stats_per_possesion(df1,df2,df3,p,m)
df1 <- data.frame("name" = c("LeBron James","Team"),"G" = c(67,0), "GS" = c(62,0),"MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0),"3P" = c(148,0),"3PA" = c(425,0), "Percentage 3P" = c(0.348,0),"2P" = c(495,0),"2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0),"FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0),"AST" = c(684,0),"STL" = c(78,0),"BLK" = c(36,0), "TOV" = c(261,0),"PF" = c(118,0),"PTS" = c(1698,0),"+/-" = c(0,0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p <- 100 m <- 48 individuals_stats_per_possesion(df1,df2,df3,p,m)
This function allows the calculation of advanced player statistics.
lineups_advance_stats(df1, m)
lineups_advance_stats(df1, m)
df1 |
Should be a Data Frame. This parameter has to be in the format provided by the lineups_advance_stats() function. |
m |
should be a number. This parameter has to be the duration of a single game. |
The function only works with the extended statistics of the lineups.
Data frame with the following advanced statistics calculated
Offensive Rating (ORtg)
Defensive Rating (DRtg)
Net Rating (NetRtg)
Pace (Pace)
Three rating (3Par)
True shooting percentage (TS%)
Efficiency Field Goals percentage (eFG%)
Assists percentage (AST%)
Offensive rebounds percentage (ORB%)
Defensive rebounds percentage (DRB%)
Total rebounds percentage (TRB%)
Turnover percentage (TOV%)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) m <- 48 lineups_advance_stats(df1,m)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) m <- 48 lineups_advance_stats(df1,m)
The function allows find the statisticts of backcourt players
lineups_backcourt(df1)
lineups_backcourt(df1)
df1 |
Should be a Data Frame. The parameter has to be in the format provided by the lineups_data_adjustment() function. |
The function works with the basic statistics of the lineups and the extended statistics of the lineups.
Data frame with the statistics of the backcourt players
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) lineups_backcourt(df1) df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) lineups_backcourt(df1)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) lineups_backcourt(df1) df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) lineups_backcourt(df1)
The function allows the comparison of a lineup when it is in the court with the statistics of the rival
lineups_comparator_stats(df1, m)
lineups_comparator_stats(df1, m)
df1 |
Should be a Data Frame. The parameter has to be in the format provided by the lineups_data_adjustment() function. |
m |
should be a number. This parameter has to be the duration of a single game. |
The function only works with the extended statistics of the lineups.
Data frame with the comparison of statistics and the following values:
Lineup usage percentage (Team%)
Pace (Pace)
Three rating (3Par)
True shooting percentage (TS%)
Efficiency Field Goals percentage (eFG%)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) m <- 48 lineups_comparator_stats(df1,m)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) m <- 48 lineups_comparator_stats(df1,m)
The function transform the statistics entered for later use in the rest of the functions that apply to lineup statistics.
lineups_data_adjustment(df1)
lineups_data_adjustment(df1)
df1 |
Should be a Data Frame |
The data.frame must have the same columns and these represent the same as in the example.
The function allows the transformation of the basic statistics of the lineups to which the shooting percentages, the total rebounds and the plus minus.
The function allows the transformation of the extended statistics of the lineups to which the total rebounds and the plus minus.
The data frame obtained for the basic statistics of lineups will have the following format:
Point Guard (PG)
Shooting Guard (SG)
Small Forward (SF)
Paint Forward (PF)
Center (C)
Games played (G)
Games Started (GS)
Minutes Played (MP)
Field Goals Made (FG)
Field Goals Attempted (FGA)
Field Goals Percentage (FG
Three Points Made (3P)
Three Points Attempted (3PA)
Three Points Percentage (3P%)
Two Points Made (2P)
Two Points Attempted (2PA)
Free Throw Made (FT)
Offensive Rebounds (ORB)
Defensive Rebounds (DRB)
Total Rebounds (TRB)
Assists (AST)
Steals (STL)
Blocks (BLK)
Turnover (TOV)
Personal Fouls (PF)
Points (PTS)
Plus (+)
Minus (-)
Plus Minus (+/-)
For the extended statistics of the lineups it will have the same format as the basic statistics of the lineups but adding the statistics of the opponent against that lineups.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG"= c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA" = c(7,0), "X3P" = c(0,0),"X3PA" = c(2,0),"X2P" = c(4,0), "X2PA" = c(5,0), "FT" = c(1,0), "FTA" = c(3,0),"ORB" = c(2,0), "DRB" = c(5,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0), "TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3)) lineups_data_adjustment(df1) df1 <- data.frame("PG" = c("James","Rondo"),"SG"= c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P " = c(1,0),"X3PA " = c(4,0), "Opp3PA ç" = c(3,0),"X2P" = c(4,0),"Opp2P" = c(5,0),"X2PA " = c(6,0), "Opp2PA" = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0), "OppFTA" = c(1,0),"OppRB" = c(2,0),"OppOppRB" = c(1,0),"DRB" = c(4,0), "OppDRB" = c(1,0),"AST " = c(5,0),"OppAST " = c(4,0),"STL" = c(1,0), "OppSTL" = c(3,0),"BLK" = c(0,0),"OppBLK" = c(1,0),"TOppV" = c(5,2), "OppTOppV" = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0),"PLUS" = c(15,0), "MINUS" = c(14,3)) lineups_data_adjustment(df1)
df1 <- data.frame("PG"= c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA" = c(7,0), "X3P" = c(0,0),"X3PA" = c(2,0),"X2P" = c(4,0), "X2PA" = c(5,0), "FT" = c(1,0), "FTA" = c(3,0),"ORB" = c(2,0), "DRB" = c(5,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0), "TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3)) lineups_data_adjustment(df1) df1 <- data.frame("PG" = c("James","Rondo"),"SG"= c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P " = c(1,0),"X3PA " = c(4,0), "Opp3PA ç" = c(3,0),"X2P" = c(4,0),"Opp2P" = c(5,0),"X2PA " = c(6,0), "Opp2PA" = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0), "OppFTA" = c(1,0),"OppRB" = c(2,0),"OppOppRB" = c(1,0),"DRB" = c(4,0), "OppDRB" = c(1,0),"AST " = c(5,0),"OppAST " = c(4,0),"STL" = c(1,0), "OppSTL" = c(3,0),"BLK" = c(0,0),"OppBLK" = c(1,0),"TOppV" = c(5,2), "OppTOppV" = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0),"PLUS" = c(15,0), "MINUS" = c(14,3)) lineups_data_adjustment(df1)
The function allows to perform the sums of two data.frames with the same format adopted after being transformed by lineups_data_adjustment() function,
lineups_games_adder(df1, df2)
lineups_games_adder(df1, df2)
df1 |
Should be a Data Frame that represents the first set of basic or extener lineups statistics. It has to be in the format provided by the lineups_data_adjustment() function. |
df2 |
Should be a Data Frame that represents the second set of basic or extener lineups statistics. It has to be in the format provided by the lineups_data_adjustment() function. |
The function will work correctly when the name of the players is the same, in case it is different it will take the lineups as different.
The function sums data sets that have an identical size,
Data frame with the sum of the statistics of the other two entered data.frame.
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) df2 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) lineups_games_adder(df1,df2)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) df2 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) lineups_games_adder(df1,df2)
The function allows find the statisticts of paint players
lineups_paint(df1)
lineups_paint(df1)
df1 |
Should be a Data Frame. The parameter has to be in the format provided by the lineups_data_adjustment() function. |
The function works with the basic statistics of the lineups and the extended statistics of the lineups.
Data frame with the statistics of the paint players
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) lineups_paint(df1) df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) lineups_paint(df1)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) lineups_paint(df1) df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) lineups_paint(df1)
The function allows you to search for statistics by position within the lineup.
lineups_players(df1, n)
lineups_players(df1, n)
df1 |
Should be a Data Frame. The parameter has to be in the format provided by the lineups_data_adjustment() function. |
n |
Should be a number. It represents the position on which you want to perform the search. |
The function allows you to search for paint players both in basic statistics and in extended statistics. The supported values for n are as follows:
If the value entered for n is 1, it will return the statistics of the grouped Point Guards.
If the value entered for n is 2, it will return the statistics of the grouped Small Guards.
If the value entered for n is 3, it will return the statistics of the grouped Small Forwards.
If the value entered for n is 4, it will return the statistics of the grouped Paint Forwards.
If the value entered for n is 5, it will return the statistics of the grouped Centers.
Data frame with the statistics by position.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) n <- 1 lineups_players(df1,n) df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) n <- 5 lineups_players(df1,n)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) n <- 1 lineups_players(df1,n) df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) n <- 5 lineups_players(df1,n)
The function allows the statistical search of the lineups where the entered players appear.
lineups_searcher(df1, n, p1, p2, p3, p4)
lineups_searcher(df1, n, p1, p2, p3, p4)
df1 |
Should be a Data Frame. This parameter has to be in the format provided by the lineups_advance_stats() function. |
n |
Should be a numer. It represents the number of player to be found. |
p1 |
Should be a String. Represents the name of the first player to be found. |
p2 |
Should be a String. Represents the name of the second player to be found. |
p3 |
Should be a String. Represents the name of a player to be found. |
p4 |
Should be a String. Represents the name of a player to be found. |
The function allows you to search for paint players both in basic statistics and in extended statistics.
The values allowed by n are 1, 2, 3 and 4.The number entered in N must be equal to the number of players searched.
The name entered in the function must be the same as the one inside the data frame.
Data frame with the statistics of the lineups where the entered players appear
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) n <- 2 p1 <- "James" p2 <- "Davis" p3 <- "" p4 <- "" lineups_searcher(df1,n,p1,p2,p3,p4)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) n <- 2 p1 <- "James" p2 <- "Davis" p3 <- "" p4 <- "" lineups_searcher(df1,n,p1,p2,p3,p4)
The function allows to separate the extended statistics of the lineups. Therefore, you can obtain the statistics of the lineups or the rival with respect to the lineups for later analysis
lineups_separator(df1, n)
lineups_separator(df1, n)
df1 |
Should be a Data Frame. The parameter has to be in the format provided by the lineups_data_adjustment() function. |
n |
Should be a number. it Represents the statistics we want to obtain. |
The function only works with the extended statistics of the lineups. The supported values for n are as follows:
If n takes the value of 1, the function will return the statistics of the lineup.
If n takes the value of 2, the function will return the statistics of the rival with respect to the lineup.
Data frame with the statistics separated in the format of the basic statistics of the lineups.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henare
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) n <- 1 lineups_separator(df1,n) n <- 2 lineups_separator(df1,n)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(6,0), "OppFG " = c(6,0), "FGA " = c(10,0),"OppFGA " = c(9,0), "X3P " = c(2,0),"Opp3P" = c(1,0),"X3PA" = c(4,0),"Opp3PA" = c(3,0), "X2P" = c(4,0),"Opp2P " = c(5,0), "X2PA " = c(6,0),"Opp2PA " = c(8,0) , "FT " = c(0,0),"OppFT " = c(1,0), "FTA " = c(0,0),"OppFTA " = c(1,0), "OppRB " = c(2,0),"OppOppRB " = c(1,0), "DRB" = c(4,0),"OppDRB" = c(1,0), "TRB" = c(6,0),"OppTRB" = c(2,0), "AST " = c(5,0),"OppAST " = c(4,0), "STL " = c(1,0),"OppSTL " = c(3,0), "BLK " = c(0,0), "OppBLK " = c(1,0), "TOppV " = c(5,2), "OppTOppV " = c(3,2),"PF" = c(1,0),"OppPF" = c(3,0), "PLUS" = c(15,0),"MINUS" = c(14,3),"P/M" = c(1,-3)) n <- 1 lineups_separator(df1,n) n <- 2 lineups_separator(df1,n)
The function do the calculation of statistics per p possesion for the differents lineups
lineups_stats_per_possesion(df1, df2, df3, p, m)
lineups_stats_per_possesion(df1, df2, df3, p, m)
df1 |
Should be a Data Frame. This parameter has to be in the format provided by the lineups_advance_stats() function. |
df2 |
Should be a Data Frame that represents the team's statistics. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame that represents the rival's statistics. The parameter has to be in the format provided by the team_stats() function. |
p |
Should be a number. This parameter has to be the number of possessions to which you want to project the statistics. |
m |
should be a number. This parameter has to be the duration of a single game. |
The function only works with the basic statistics of the lineups.
The statistical projection is made from the estimation of the possessions that the team plays when the lineups is on the court.
Data frame whit statistics per p possesion
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p <- 100 m <- 48 lineups_stats_per_possesion(df1,df2,df3,p,m)
df1 <- data.frame("PG" = c("James","Rondo"),"SG" = c("Green","Caruso"), "SF" = c("Caldwell","Kuzma"), "PF" = c("Davis","Davis"), "C" = c("Howard ","Howard"),"MP" = c(7,1), "FG " = c(4,0), "FGA " = c(7,0),"Percentage FG" = c(0.571,0), "X3P " = c(0,0),"X3PA " = c(2,0),"Percentage 3P" = c(0,0), "X2P " = c(4,0), "X2PA " = c(5,0), "Percentage 2P" = c(0.8,0), "FT " = c(1,0), "FTA " = c(3,0), "Percentage FT" = c(0.333,0), "ORB " = c(2,0), "DRB " = c(5,0),"TRB " = c(7,0), "AST " = c(2,0), "STL " = c(1,0), "BLK " = c(0,0),"TOV " = c(7,2), "PF" = c(1,0), "PLUS" = c(9,0),"MINUS" = c(17,3),"P/M" = c(-8,-3)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48),"3P" = c(782),"3PA" = c(2242), "Percentage 3P" = c(0.349),"2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552),"FT" = c(1260),"FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490), "TRB" = c(3247), "AST" = c(1803), "STL" = c(612),"BLK" = c(468), "TOV" = c(1077),"PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p <- 100 m <- 48 lineups_stats_per_possesion(df1,df2,df3,p,m)
This function allows the calculation of advanced play statistics.
play_advance_stats(df1)
play_advance_stats(df1)
df1 |
Should be a Data Frame that represents the play's statistics. The parameter has to be in the format provided by the play_data_adjustment() function. |
Data frame with the following advanced statistics calculated:
Points Per Possession (PPP)
Possessions (POSS)
Frequency (Freq)
Efficiency Field Goals percentage (eFG%)
Free Throw Percentage (FT%)
Assists percentage (AST%)
Turnover percentage (TOV%)
And One percentage (AndOne%)
Score percentage (Score%)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_advance_stats(df1)
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_advance_stats(df1)
The function transform the statistics entered for later use in the rest of the functions that apply to play statistics.
play_data_adjustment(df1)
play_data_adjustment(df1)
df1 |
Should be a Data Frame that represents the play's statistics. The parameter has to be in the format provided by the play_data_adjustment() function. |
The data.frame must have the same columns and these represent the same as in the example.
The input data.frame must have the last row that represents the team's statistics.
The function allows the transformation of the play statistics to which the shooting percentages.
The data frame obtained for the play statistics will have the following format:
Name of the player (Name)
Games Started (GS)
Points (PTS)
Field Goals Made (FG)
Field Goals Attempted (FGA)
Field Goals Percentage (FG%)
Three Points Made (3P)
Three Points Attempted (3PA)
Three Points Percentage (3P%)
Two Points Made (2P)
Two Points Attempted (2PA)
Two Points Percentage (2P%)
Free Throw Made (FT)
Free Throw Attempted (FTA)
Free Throw Percentage (FT%)
And One Times (ANDONE)
Assists (AST)
Turnover (TOV)
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "3P" = c(6,1),"3PA" = c(18,1), "FT" = c(39,1), "FTA" = c(53,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_data_adjustment(df1)
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "3P" = c(6,1),"3PA" = c(18,1), "FT" = c(39,1), "FTA" = c(53,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_data_adjustment(df1)
The function allows to perform the sums of two data.frames with the same format adopted after being transformed by play_data_adjustment() function,
play_games_adder(df1, df2)
play_games_adder(df1, df2)
df1 |
Should be a Data Frame that represents the first set of play's statistics. It has to be in the format provided by the play_data_adjustment() function. |
df2 |
Should be a Data Frame that represents the second set of play's statistics. It has to be in the format provided by the play_data_adjustment() function. |
The function will work correctly when the name of the players is the same, in case it is different it will take the players as different.
Data frame with the sum of the statistics of the other two entered data frame.
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) df2 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_games_adder(df1,df2)
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) df2 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_games_adder(df1,df2)
The function allows the calculation of play statistics per game.
play_stats_per_game(df1)
play_stats_per_game(df1)
df1 |
Should be a Data Frame that represents the play's statistics. The parameter has to be in the format provided by the play_data_adjustment() function. |
The calculation is made with the number of games played by the player.
Data frame with play statistics per game
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_stats_per_game(df1)
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_stats_per_game(df1)
The function allows the calculation of the statistics per game projected to P possesions.
play_stats_per_possesion(df1, df2, df3, p, m)
play_stats_per_possesion(df1, df2, df3, p, m)
df1 |
Should be a Data Frame that represents the play's statistics. The parameter has to be in the format provided by the play_data_adjustment() function. |
df2 |
Should be a Data Frame that represents the team's statistics. The parameter has to be in the format provided by the team_stats() function. |
df3 |
Should be a Data Frame that represents the rival's statistics. The parameter has to be in the format provided by the team_stats() function. |
p |
Should be a number. This parameter has to be the number of possessions to which you want to project the statistics. |
m |
should be a number. This parameter has to be the duration of a single game. |
The statistical projection is made from the estimation of the possessions that the team plays when the player is on the court.
Data frame with statistics by game projected to the possesions entered
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247),"AST" = c(1803),"STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p<- 100 m <- 48 play_stats_per_possesion(df1,df2,df3,p,m)
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247),"AST" = c(1803),"STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df3 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p<- 100 m <- 48 play_stats_per_possesion(df1,df2,df3,p,m)
The function performs the sum of the statistical sections to obtain a data.frame with the total statistics of the team.
play_team_stats(df1)
play_team_stats(df1)
df1 |
Should be a Data Frame that represents the play's statistics. This parameter has to be in the format provided by the play_data_adjustment() function. |
Data frame whit the team's plays statistics
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_team_stats(df1)
df1 <- data.frame("Name" = c("Sabonis ","Team"), "GP" = c(62,71), "PTS" = c(387,0), "FG" = c(155,1), "FGA" = c(281,1), "FGA Percentage" = c(0.552,1),"3P" = c(6,1),"3PA" = c(18,1), "3P Percentage" = c(0.333,1),"2P" = c(149,0),"2PA" = c(263,0), "2P Percentage" = c(0.567,0),"FT" = c(39,1), "FTA" = c(53,1), "FT Percentage" = c(0.736,1), "ANDONE" = c(12,1), "AST" = c(0,1), "TOV" = c(27,1)) play_team_stats(df1)
This function allows the calculation of advanced team's statistics.
team_advanced_stats(df1, df2, m)
team_advanced_stats(df1, df2, m)
df1 |
Should be a Data Frame that represents the team statistics. This parameter has to be in the format provided by the team_stats() function. |
df2 |
Should be a Data Frame that represents the rival statistics. This parameter has to be in the format provided by the team_stats() function. |
m |
should be a number. This parameter has to be the duration of a single game. |
Data frame with the following advanced statistics calculated:
Offensive Rating (ORtg)
Defensive Rating (DRtg)
Net Rating (NetRtg)
Pace (Pace)
Three rating (3Par)
True shooting percentage (TS%)
Efficiency Field Goals percentage (eFG%)
Assists percentage (AST%)
Assist to Turnover Ratio (AST/TO)
Assist Ratio (ASTRATIO)
Offensive rebounds percentage (ORB%)
Defensive rebounds percentage (DRB%)
Total rebounds percentage (TRB%)
Turnover percentage (TOV%)
Free Throw rating (FTr)
Opponent Efficiency Field Goals percentage (Opp eFG%)
Opponent Turnover percentage (Opp TOV%)
Opponent Defensive rebounds percentage (Opp DRB%)
Opponent Free Throw rating (Opp FTr)
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247),"AST" = c(1803),"STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) m <- 48 team_advanced_stats(df1,df2,m)
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247),"AST" = c(1803),"STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) m <- 48 team_advanced_stats(df1,df2,m)
This function allows the team statistics from individual statistics.
team_stats(df1)
team_stats(df1)
df1 |
Should be a Data Frame that represents the individual statistics or individual defensive statistics of the players. The parameter has to be in the format provided by the data_adjustment() function. |
The function performs the sum of the statistical sections to obtain a data.frame with the total statistics of the team.
Data frame with the sum of the team's statistics.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("name" = c("LeBron James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0), "3P" = c(148,0), "3PA" = c(425,0), "Percentage 3P" = c(0.348,0), "2P" = c(495,0), "2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0), "FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0),"TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) team_stats(df1)
df1 <- data.frame("name" = c("LeBron James","Team"), "G" = c(67,0), "GS" = c(62,0), "MP" = c(2316,0),"FG" = c(643,0), "FGA" = c(1303,0), "Percentage FG" = c(0.493,0), "3P" = c(148,0), "3PA" = c(425,0), "Percentage 3P" = c(0.348,0), "2P" = c(495,0), "2PA" = c(878,0), "Percentage 2P" = c(0.564,0),"FT" = c(264,0), "FTA FG" = c(381,0), "Percentage FT" = c(0.693,0), "ORB" = c(66,0),"DRB" = c(459,0), "TRB" = c(525,0), "AST" = c(684,0), "STL" = c(78,0), "BLK" = c(36,0),"TOV" = c(261,0), "PF" = c(118,0), "PTS" = c(1698,0), "+/-" = c(0,0)) team_stats(df1)
The function allows the calculation of team's statistics per game.
team_stats_per_game(df1)
team_stats_per_game(df1)
df1 |
Should be a Data Frame that represents the team statistics. This parameter has to be in the format provided by the team_stats() function. |
The calculation is made with the number of games played by the team.
Data frame whit the team's statistics per game
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247), "AST" = c(1803), "STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) team_stats_per_game(df1)
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247), "AST" = c(1803), "STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) team_stats_per_game(df1)
The function allows the calculation of the team statistics per game projected to M minutes.
team_stats_per_minutes(df1, m)
team_stats_per_minutes(df1, m)
df1 |
Should be a Data Frame that represents the team statistics. This parameter has to be in the format provided by the team_stats() function. |
m |
Should be a number. This parameter has to be the number of minutes to which you want to project the statistics. |
The statistical projection is made from the relationship between the number of minutes entered and the number of minutes played by the team
Data frame with statistics by game projected to the minutes entered.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247), "AST" = c(1803), "STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) m <- 48 team_stats_per_minutes(df1,m)
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247), "AST" = c(1803), "STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) m <- 48 team_stats_per_minutes(df1,m)
The function allows the calculation of the statistics per game projected to P possesions.
team_stats_per_possesion(df1, df2, p)
team_stats_per_possesion(df1, df2, p)
df1 |
Should be a Data Frame that represents the team statistics. This parameter has to be in the format provided by the team_stats() function. |
df2 |
Should be a Data Frame that represents the rival statistics. This parameter has to be in the format provided by the team_stats() function. |
p |
Should be a number. This parameter has to be the number of possessions to which you want to project the statistics. |
The statistical projection is made from the estimation of the possessions that the team plays.
Data frame with statistics by game projected to the possessions entered.
Fco Javier Cantero [email protected]
Juan José Cuadrado [email protected]
Universidad de Alcalá de Henares
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247),"AST" = c(1803),"STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p <- 100 team_stats_per_possesion(df1,df2,p)
df1 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(3006), "FGA" = c(6269),"Percentage FG" = c(0.48), "3P" = c(782), "3PA" = c(2242), "Percentage 3P" = c(0.349), "2P" = c(2224), "2PA" = c(4027), "Percentage 2P" = c(0.552), "FT" = c(1260), "FTA FG" = c(1728), "Percentage FT" = c(0.729), "ORB" = c(757), "DRB" = c(2490),"TRB" = c(3247),"AST" = c(1803),"STL" = c(612), "BLK" = c(468), "TOV" = c(1077), "PF" = c(1471), "PTS" = c(8054), "+/-" = c(0)) df2 <- data.frame("G" = c(71), "MP" = c(17090), "FG" = c(2773), "FGA" = c(6187),"Percentage FG" = c(0.448), "3P" = c(827), "3PA" = c(2373), "Percentage 3P" = c(0.349), "2P" = c(1946), "2PA" = c(3814), "Percentage 2P" = c(0.510), "FT" = c(1270), "FTA FG" = c(1626), "Percentage FT" = c(0.781), "ORB" = c(668), "DRB" = c(2333),"TRB" = c(3001), "AST" = c(1662),"STL" = c(585), "BLK" = c(263), "TOV" = c(1130), "PF" = c(1544), "PTS" = c(7643), "+/-" = c(0)) p <- 100 team_stats_per_possesion(df1,df2,p)