lineups_separator: Statistics separator

Description Usage Arguments Details Value Author(s) Examples

View source: R/lineups_separator.R

Description

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

Usage

1

Arguments

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.

Details

The function only works with the extended statistics of the lineups. The supported values for n are as follows:

Value

Data frame with the statistics separated in the format of the basic statistics of the lineups.

Author(s)

Fco Javier Cantero fco.cantero@edu.uah.es

Juan José Cuadrado jjcg@uah.es

Universidad de Alcalá de Henare

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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)

AdvancedBasketballStats documentation built on April 6, 2021, 5:06 p.m.