individuals_games_adder {AdvancedBasketballStats} | R Documentation |
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)
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)