### 1. Create table ### col_head = c("Team","GP","W","D","L","GF","GA","GD","Pts") # Column headings teams = c("B29","CLE","LEH","LIL","LOR","MTZ","AMO","MPL","NAN", "NCE","LYO","OLM","PSG","LEN","REI","REN","STR","TOU") # List of teams Tbl = matrix(0,nrow=length(teams),ncol=9) # Create empty table colnames(Tbl) <- col_head # Insert column headings Tbl[,1] = teams # Put teams in table table = data.frame(Tbl) # Convert to data frame # Change number columns to integer form # table$GP <- as.integer(table$GP) table$W <- as.integer(table$W) table$D <- as.integer(table$D) table$L <- as.integer(table$L) table$GF <- as.integer(table$GF) table$GA <- as.integer(table$GA) table$GD <- as.integer(table$GD) table$Pts <- as.integer(table$Pts) ### 2. Fill table ### ## Gameweek 1 ## # Nice 1 - LOSC 1 # NCE = matrix(c(1,1),nrow=2) LIL = matrix(c(1,1),nrow=2) # Marseille 2 - Reims 1 # OLM = matrix(c(2,1),nrow=2) REI = matrix(c(1,2),nrow=2) # PSG 0 - Lorient 0 # PSG = matrix(c(0,0),nrow=2) LOR = matrix(c(0,0),nrow=2) # Brest 3 - Lens 2 # B29 = matrix(c(3,2),nrow=2) LEN = matrix(c(2,3),nrow=2) # Nantes 1 - Toulouse 2 # NAN = matrix(c(1,2),nrow=2) TOU = matrix(c(2,1),nrow=2) # Clermont Foot 2 - Monaco 4 # CLE = matrix(c(2,4),nrow=2) AMO = matrix(c(4,2),nrow=2) # Montpellier 2 - Le Havre 2 # MPL = matrix(c(2,2),nrow=2) LEH = matrix(c(2,2),nrow=2) # Rennes 5 - Metz 1 # REN = matrix(c(5,1),nrow=2) MTZ = matrix(c(1,5),nrow=2) # Strasbourg 2 - Lyon 1 # STR = matrix(c(2,1),nrow=2) LYO = matrix(c(1,2),nrow=2) ## Gameweek 2 ## # Metz 2 - Marseille 2 # MTZ = cbind(MTZ,c(2,2)) OLM = cbind(OLM,c(2,2)) # Lyon 1 - Montpellier 4 # LYO = cbind(LYO,c(1,4)) MPL = cbind(MPL,c(4,1)) # Toulouse 1 - PSG 1 # TOU = cbind(TOU,c(1,1)) PSG = cbind(PSG,c(1,1)) # LOSC 2 - Nantes 0 # LIL = cbind(LIL,c(2,0)) NAN = cbind(NAN,c(0,2)) # Reims 2 - Clermont Foot 0 # REI = cbind(REI,c(2,0)) CLE = cbind(CLE,c(0,2)) # Lorient 1 - Nice 1 # LOR = cbind(LOR,c(1,1)) NCE = cbind(NCE,c(1,1)) # Le Havre 1 - Brest 2 # LEH = cbind(LEH,c(1,2)) B29 = cbind(B29,c(2,1)) # Monaco 3 - Strasbourg 0 # AMO = cbind(AMO,c(3,0)) STR = cbind(STR,c(0,3)) # Lens 1 - Rennes 1 # LEN = cbind(LEN,c(1,1)) REN = cbind(REN,c(1,1)) ## Gameweek 3 ## # Nantes 3 - Monaco 3 # NAN = cbind(NAN,c(3,3)) AMO = cbind(AMO,c(3,3)) # Marseille 2 - Brest 0 # OLM = cbind(OLM,c(2,0)) B29 = cbind(B29,c(0,2)) # PSG 3 - Lens 1 # PSG = cbind(PSG,c(3,1)) LEN = cbind(LEN,c(1,3)) # Rennes 2 - Le Havre 2 # REN = cbind(REN,c(2,2)) LEH = cbind(LEH,c(2,2)) # Clermont Foot 0 - Metz 1 # CLE = cbind(CLE,c(0,1)) MTZ = cbind(MTZ,c(1,0)) # Strasbourg 2 - Toulouse 0 # STR = cbind(STR,c(2,0)) TOU = cbind(TOU,c(0,2)) # Montpellier 1 - Reims 3 # MPL = cbind(MPL,c(1,3)) REI = cbind(REI,c(3,1)) # Lorient 4 - LOSC 1 # LOR = cbind(LOR,c(4,1)) LIL = cbind(LIL,c(1,4)) # Nice 0 - Lyon 0 # NCE = cbind(NCE,c(0,0)) LYO = cbind(LYO,c(0,0)) ## Gameweek 4 ## # Nantes 1 - Marseille 1 # NAN = cbind(NAN,c(1,1)) OLM = cbind(OLM,c(1,1)) # Brest 0 - Rennes 0 # B29 = cbind(B29,c(0,0)) REN = cbind(REN,c(0,0)) # Monaco 3 - Lens 0 # AMO = cbind(AMO,c(3,0)) LEN = cbind(LEN,c(0,3)) # Toulouse 2 - Clermont Foot 2 # TOU = cbind(TOU,c(2,2)) CLE = cbind(CLE,c(2,2)) # Le Havre 3 - Lorient 0 # LEH = cbind(LEH,c(3,0)) LOR = cbind(LOR,c(0,3)) # Metz 2 - Reims 2 # MTZ = cbind(MTZ,c(2,2)) REI = cbind(REI,c(2,2)) # LOSC 1 - Montpellier 0 # LIL = cbind(LIL,c(1,0)) MPL = cbind(MPL,c(0,1)) # Nice 2 - Strasbourg 0 # NCE = cbind(NCE,c(2,0)) STR = cbind(STR,c(0,2)) # Lyon 1 - PSG 4 # LYO = cbind(LYO,c(1,4)) PSG = cbind(PSG,c(4,1)) ## Gameweek 5 ## # PSG 2 - Nice 3 # PSG = cbind(PSG,c(2,3)) NCE = cbind(NCE,c(3,2)) # Rennes 2 - LOSC 2 # REN = cbind(REN,c(2,2)) LIL = cbind(LIL,c(2,2)) # Lens 0 - Metz 1 # LEN = cbind(LEN,c(0,1)) MTZ = cbind(MTZ,c(1,0)) # Lorient 2 - Monaco 2 # LOR = cbind(LOR,c(2,2)) AMO = cbind(AMO,c(2,2)) # Reims 1 - Brest 2 # REI = cbind(REI,c(1,2)) B29 = cbind(B29,c(2,1)) # Clermont Foot 0 - Nantes 1 # CLE = cbind(CLE,c(0,1)) NAN = cbind(NAN,c(1,0)) # Strasbourg 2 - Montpellier 2 # STR = cbind(STR,c(2,2)) MPL = cbind(MPL,c(2,2)) # Marseille 0 - Toulouse 0 # OLM = cbind(OLM,c(0,0)) TOU = cbind(TOU,c(0,0)) # Lyon 0 - Le Havre 0 # LYO = cbind(LYO,c(0,0)) LEH = cbind(LEH,c(0,0)) ## Gameweek 6 ## # Monaco 0 - Nice 1 # AMO = cbind(AMO,c(0,1)) NCE = cbind(NCE,c(1,0)) # Nantes 5 - Lorient 3 # NAN = cbind(NAN,c(5,3)) LOR = cbind(LOR,c(3,5)) # Brest 1 - Lyon 0 # B29 = cbind(B29,c(1,0)) LYO = cbind(LYO,c(0,1)) # Metz 0 - Strasbourg 1 # MTZ = cbind(MTZ,c(0,1)) STR = cbind(STR,c(1,0)) # Lens 2 - Toulouse 1 # LEN = cbind(LEN,c(2,1)) TOU = cbind(TOU,c(1,2)) # Le Havre 2 - Clermont Foot 1 # LEH = cbind(LEH,c(2,1)) CLE = cbind(CLE,c(1,2)) # Montpellier 0 - Rennes 0 # MPL = cbind(MPL,c(0,0)) REN = cbind(REN,c(0,0)) # PSG 4 - Marseille 0 # PSG = cbind(PSG,c(4,0)) OLM = cbind(OLM,c(0,4)) # LOSC 1 - Reims 2 # LIL = cbind(LIL,c(1,2)) REI = cbind(REI,c(2,1)) ## Gameweek 7 ## # Strasbourg 0 - Lens 1 # STR = cbind(STR,c(0,1)) LEN = cbind(LEN,c(1,0)) # Clermont Foot 0 - PSG 0 # CLE = cbind(CLE,c(0,0)) PSG = cbind(PSG,c(0,0)) # Monaco 3 - Marseille 2 # AMO = cbind(AMO,c(3,2)) OLM = cbind(OLM,c(2,3)) # Reims 2 - Lyon 0 # REI = cbind(REI,c(2,0)) LYO = cbind(LYO,c(0,2)) # Le Havre 0 - LOSC 2 # LEH = cbind(LEH,c(0,2)) LIL = cbind(LIL,c(2,0)) # Toulouse 3 - Metz 0 # TOU = cbind(TOU,c(3,0)) MTZ = cbind(MTZ,c(0,3)) # Nice 0 - Brest 0 # NCE = cbind(NCE,c(0,0)) B29 = cbind(B29,c(0,0)) # Lorient 0 - Montpellier 3 # LOR = cbind(LOR,c(0,3)) MPL = cbind(MPL,c(3,0)) # Rennes 3 - Nantes 1 # REN = cbind(REN,c(3,1)) NAN = cbind(NAN,c(1,3)) ## Gameweek 8 ## # Strasbourg 1 - Nantes 2 # STR = cbind(STR,c(1,2)) NAN = cbind(NAN,c(2,1)) # Metz 0 - Nice 1 # MTZ = cbind(MTZ,c(0,1)) NCE = cbind(NCE,c(1,0)) # Reims 1 - Monaco 3 # REI = cbind(REI,c(1,3)) AMO = cbind(AMO,c(3,1)) # Marseille 3 - Le Havre 0 # OLM = cbind(OLM,c(3,0)) LEH = cbind(LEH,c(0,3)) # Lyon 3 - Lorient 3 # LYO = cbind(LYO,c(3,3)) LOR = cbind(LOR,c(3,3)) # Brest 1 - Toulouse 1 # B29 = cbind(B29,c(1,1)) TOU = cbind(TOU,c(1,1)) # Lens 1 - LOSC 1 # LEN = cbind(LEN,c(1,1)) LIL = cbind(LIL,c(1,1)) # Rennes 1 - PSG 3 # REN = cbind(REN,c(1,3)) PSG = cbind(PSG,c(3,1)) ## Gameweek 9 ## # Le Havre 0 - Lens 0 # LEH = cbind(LEH,c(0,0)) LEN = cbind(LEN,c(0,0)) # PSG 3 - Strasbourg 0 # PSG = cbind(PSG,c(3,0)) STR = cbind(STR,c(0,3)) # Nice 1 - Marseille 0 # NCE = cbind(NCE,c(1,0)) OLM = cbind(OLM,c(0,1)) # Lorient 2 - Rennes 1 # LOR = cbind(LOR,c(2,1)) REN = cbind(REN,c(1,2)) # LOSC 1 - Brest 0 # LIL = cbind(LIL,c(1,0)) B29 = cbind(B29,c(0,1)) # Toulouse 1 - Reims 1 # TOU = cbind(TOU,c(1,1)) REI = cbind(REI,c(1,1)) # Nantes 2 - Montpellier 0 # NAN = cbind(NAN,c(2,0)) MPL = cbind(MPL,c(0,2)) # Monaco 2 - Metz 1 # AMO = cbind(AMO,c(2,1)) MTZ = cbind(MTZ,c(1,2)) # Lyon 1 - Clermont Foot 2 # LYO = cbind(LYO,c(1,2)) CLE = cbind(CLE,c(2,1)) ## Gameweek 10 ## # Clermont Foot 0 - Nice 1 # CLE = cbind(CLE,c(0,1)) NCE = cbind(NCE,c(1,0)) # Reims 1 - Lorient 0 # REI = cbind(REI,c(1,0)) LOR = cbind(LOR,c(0,1)) # Lens 4 - Nantes 0 # LEN = cbind(LEN,c(4,0)) NAN = cbind(NAN,c(0,4)) # Brest 2 - PSG 3 # B29 = cbind(B29,c(2,3)) PSG = cbind(PSG,c(3,2)) # LOSC 2 - Monaco 0 # LIL = cbind(LIL,c(2,0)) AMO = cbind(AMO,c(0,2)) # Montpellier 3 - Toulouse 0 # MPL = cbind(MPL,c(3,0)) TOU = cbind(TOU,c(0,3)) # Metz 0 - Le Havre 0 # MTZ = cbind(MTZ,c(0,0)) LEH = cbind(LEH,c(0,0)) # Rennes 1 - Strasbourg 1 # REN = cbind(REN,c(1,1)) STR = cbind(STR,c(1,1)) ## Gameweek 11 ## # PSG 3 - Montpellier 0 # PSG = cbind(PSG,c(3,0)) MPL = cbind(MPL,c(0,3)) # Lorient 0 - Lens 0 # LOR = cbind(LOR,c(0,0)) LEN = cbind(LEN,c(0,0)) # Marseille 0 - LOSC 0 # OLM = cbind(OLM,c(0,0)) LIL = cbind(LIL,c(0,0)) # Lyon 1 - Metz 1 # LYO = cbind(LYO,c(1,1)) MTZ = cbind(MTZ,c(1,1)) # Toulouse 1 - Le Havre 2 # TOU = cbind(TOU,c(1,2)) LEH = cbind(LEH,c(2,1)) # Nantes 0 - Reims 1 # NAN = cbind(NAN,c(0,1)) REI = cbind(REI,c(1,0)) # Strasbourg 0 - Clermont Foot 0 # STR = cbind(STR,c(0,0)) CLE = cbind(CLE,c(0,0)) # Monaco 2 - Brest 0 # AMO = cbind(AMO,c(2,0)) B29 = cbind(B29,c(0,2)) # Nice 2 - Rennes 0 # NCE = cbind(NCE,c(2,0)) REN = cbind(REN,c(0,2)) ## Gameweek 12 ## # Montpellier 0 - Nice 0 # MPL = cbind(MPL,c(0,0)) NCE = cbind(NCE,c(0,0)) # Reims 0 - PSG 3 # REI = cbind(REI,c(0,3)) PSG = cbind(PSG,c(3,0)) # Le Havre 0 - Monaco 0 # LEH = cbind(LEH,c(0,0)) AMO = cbind(AMO,c(0,0)) # Clermont Foot 1 - Lorient 0 # CLE = cbind(CLE,c(1,0)) LOR = cbind(LOR,c(0,1)) # Metz 3 - Nantes 1 # MTZ = cbind(MTZ,c(3,1)) NAN = cbind(NAN,c(1,3)) # LOSC 1 - Toulouse 1 # LIL = cbind(LIL,c(1,1)) TOU = cbind(TOU,c(1,1)) # Rennes 0 - Lyon 1 # REN = cbind(REN,c(0,1)) LYO = cbind(LYO,c(1,0)) # Lens 1 - Marseille 0 # LEN = cbind(LEN,c(1,0)) OLM = cbind(OLM,c(0,1)) ## Gameweek 13 ## # PSG 5 - Monaco 2 # PSG = cbind(PSG,c(5,2)) AMO = cbind(AMO,c(2,5)) # Clermont Foot 0 - Lens 3 # CLE = cbind(CLE,c(0,3)) LEN = cbind(LEN,c(3,0)) # Strasbourg 1 - Marseille 1 # STR = cbind(STR,c(1,1)) OLM = cbind(OLM,c(1,1)) # Nice 1 - Toulouse 0 # NCE = cbind(NCE,c(1,0)) TOU = cbind(TOU,c(0,1)) # Montpellier 1 - Brest 3 # MPL = cbind(MPL,c(1,3)) B29 = cbind(B29,c(3,1)) # Lorient 2 - Metz 3 # LOR = cbind(LOR,c(2,3)) MTZ = cbind(MTZ,c(3,2)) # Nantes 0 - Le Havre 0 # NAN = cbind(NAN,c(0,0)) LEH = cbind(LEH,c(0,0)) # Rennes 3 - Reims 1 # REN = cbind(REN,c(3,1)) REI = cbind(REI,c(1,3)) # Lyon 0 - LOSC 2 # LYO = cbind(LYO,c(0,2)) LIL = cbind(LIL,c(2,0)) # Montpellier 1 - Clermont Foot 1 # MPL = cbind(MPL,c(1,1)) CLE = cbind(CLE,c(1,1)) ## Gameweek 14 ## # Reims 2 - Strasbourg 1 # REI = cbind(REI,c(2,1)) STR = cbind(STR,c(1,2)) # Lens 3 - Lyon 2 # LEN = cbind(LEN,c(3,2)) LYO = cbind(LYO,c(2,3)) # Nantes 1 - Nice 0 # NAN = cbind(NAN,c(1,0)) NCE = cbind(NCE,c(0,1)) # Le Havre 0 - PSG 2 # LEH = cbind(LEH,c(0,2)) PSG = cbind(PSG,c(2,0)) # Toulouse 1 - Lorient 1 # TOU = cbind(TOU,c(1,1)) LOR = cbind(LOR,c(1,1)) # Brest 3 - Clermont Foot 0 # B29 = cbind(B29,c(3,0)) CLE = cbind(CLE,c(0,3)) # Monaco 2 - Montpellier 0 # AMO = cbind(AMO,c(2,0)) MPL = cbind(MPL,c(0,2)) # LOSC 2 - Metz 0 # LIL = cbind(LIL,c(2,0)) MTZ = cbind(MTZ,c(0,2)) # Marseille 2 - Rennes 0 # OLM = cbind(OLM,c(2,0)) REN = cbind(REN,c(0,2)) # Marseille 3 - Lyon 0 # OLM = cbind(OLM,c(3,0)) LYO = cbind(LYO,c(0,3)) # Brest 1 - Strasbourg 1 # B29 = cbind(B29,c(1,1)) STR = cbind(STR,c(1,1)) ## Gameweek 15 ## # Montpellier 0 - Lens 0 # MPL = cbind(MPL,c(0,0)) LEN = cbind(LEN,c(0,0)) # Rennes 1 - Monaco 2 # REN = cbind(REN,c(1,2)) AMO = cbind(AMO,c(2,1)) # PSG 2 - Nantes 1 # PSG = cbind(PSG,c(2,1)) NAN = cbind(NAN,c(1,2)) # Nice 2 - Reims 1 # NCE = cbind(NCE,c(2,1)) REI = cbind(REI,c(1,2)) # Clermont Foot 0 - LOSC 0 # CLE = cbind(CLE,c(0,0)) LIL = cbind(LIL,c(0,0)) # Strasbourg 2 - Le Havre 1 # STR = cbind(STR,c(2,1)) LEH = cbind(LEH,c(1,2)) # Metz 0 - Brest 1 # MTZ = cbind(MTZ,c(0,1)) B29 = cbind(B29,c(1,0)) # Lyon 3 - Toulouse 0 # LYO = cbind(LYO,c(3,0)) TOU = cbind(TOU,c(0,3)) # Lorient 2 - Marseille 4 # LOR = cbind(LOR,c(2,4)) OLM = cbind(OLM,c(4,2)) ## Gameweek 16 ## # Monaco 0 - Lyon 1 # AMO = cbind(AMO,c(0,1)) LYO = cbind(LYO,c(1,0)) # Le Havre 3 - Nice 1 # LEH = cbind(LEH,c(3,1)) NCE = cbind(NCE,c(1,3)) # Lens 2 - Reims 0 # LEN = cbind(LEN,c(2,0)) REI = cbind(REI,c(0,2)) # Nantes 0 - Brest 2 # NAN = cbind(NAN,c(0,2)) B29 = cbind(B29,c(2,0)) # Toulouse 0 - Rennes 0 # TOU = cbind(TOU,c(0,0)) REN = cbind(REN,c(0,0)) # Metz 0 - Montpellier 1 # MTZ = cbind(MTZ,c(0,1)) MPL = cbind(MPL,c(1,0)) # Lorient 1 - Strasbourg 2 # LOR = cbind(LOR,c(1,2)) STR = cbind(STR,c(2,1)) # Marseille 2 - Clermont Foot 1 # OLM = cbind(OLM,c(2,1)) CLE = cbind(CLE,c(1,2)) # LOSC 1 - PSG 1 # LIL = cbind(LIL,c(1,1)) PSG = cbind(PSG,c(1,1)) ## Gameweek 17 ## # Clermont Foot 1 - Rennes 3 # CLE = cbind(CLE,c(1,3)) REN = cbind(REN,c(3,1)) # Montpellier 1 - Marseille 1 # MPL = cbind(MPL,c(1,1)) OLM = cbind(OLM,c(1,1)) # Brest 4 - Lorient 0 # B29 = cbind(B29,c(4,0)) LOR = cbind(LOR,c(0,4)) # PSG 3 - Metz 1 # PSG = cbind(PSG,c(3,1)) MTZ = cbind(MTZ,c(1,3)) # Toulouse 1 - Monaco 2 # TOU = cbind(TOU,c(1,2)) AMO = cbind(AMO,c(2,1)) # Lyon 1 - Nantes 0 # LYO = cbind(LYO,c(1,0)) NAN = cbind(NAN,c(0,1)) # Reims 1 - Le Havre 0 # REI = cbind(REI,c(1,0)) LEH = cbind(LEH,c(0,1)) # Strasbourg 2 - LOSC 1 # STR = cbind(STR,c(2,1)) LIL = cbind(LIL,c(1,2)) # Nice 2 - Lens 0 # NCE = cbind(NCE,c(2,0)) LEN = cbind(LEN,c(0,2)) ## Gameweek 18 ## # Marseille 1 - Strasbourg 1 # OLM = cbind(OLM,c(1,1)) STR = cbind(STR,c(1,1)) # Monaco 1 - Reims 3 # AMO = cbind(AMO,c(1,3)) REI = cbind(REI,c(3,1)) # Rennes 2 - Nice 0 # REN = cbind(REN,c(2,0)) NCE = cbind(NCE,c(0,2)) # LOSC 3 - Lorient 0 # LIL = cbind(LIL,c(3,0)) LOR = cbind(LOR,c(0,3)) # Nantes 1 - Clermont Foot 2 # NAN = cbind(NAN,c(1,2)) CLE = cbind(CLE,c(2,1)) # Brest 2 - Montpellier 0 # B29 = cbind(B29,c(2,0)) MPL = cbind(MPL,c(0,2)) # Metz 0 - Toulouse 1 # MTZ = cbind(MTZ,c(0,1)) TOU = cbind(TOU,c(1,0)) # Le Havre 3 - Lyon 1 # LEH = cbind(LEH,c(3,1)) LYO = cbind(LYO,c(1,3)) # Lens 0 - PSG 2 # LEN = cbind(LEN,c(0,2)) PSG = cbind(PSG,c(2,0)) ## Gameweek 19 ## # Lyon 2 - Rennes 3 # LYO = cbind(LYO,c(2,3)) REN = cbind(REN,c(3,2)) # Nice 1 - Metz 0 # NCE = cbind(NCE,c(1,0)) MTZ = cbind(MTZ,c(0,1)) # Marseille 2 - Monaco 2 # OLM = cbind(OLM,c(2,2)) AMO = cbind(AMO,c(2,2)) # Montpellier 0 - LOSC 0 # MPL = cbind(MPL,c(0,0)) LIL = cbind(LIL,c(0,0)) # Reims 0 - Nantes 0 # REI = cbind(REI,c(0,0)) NAN = cbind(NAN,c(0,0)) # Clermont Foot 1 - Strasbourg 1 # CLE = cbind(CLE,c(1,1)) STR = cbind(STR,c(1,1)) # Lorient 3 - Le Havre 3 # LOR = cbind(LOR,c(3,3)) LEH = cbind(LEH,c(3,3)) # Toulouse 0 - Lens 2 # TOU = cbind(TOU,c(0,2)) LEN = cbind(LEN,c(2,0)) # PSG 2 - Brest 2 # PSG = cbind(PSG,c(2,2)) B29 = cbind(B29,c(2,2)) ## Gameweek 20 ## # Strasbourg 1 - PSG 2 # STR = cbind(STR,c(1,2)) PSG = cbind(PSG,c(2,1)) # Rennes 2 - Montpellier 1 # REN = cbind(REN,c(2,1)) MPL = cbind(MPL,c(1,2)) # Nantes 0 - Lens 1 # NAN = cbind(NAN,c(0,1)) LEN = cbind(LEN,c(1,0)) # Monaco 1 - Le Havre 1 # AMO = cbind(AMO,c(1,1)) LEH = cbind(LEH,c(1,1)) # Reims 2 - Toulouse 3 # REI = cbind(REI,c(2,3)) TOU = cbind(TOU,c(3,2)) # LOSC 4 - Clermont Foot 0 # LIL = cbind(LIL,c(4,0)) CLE = cbind(CLE,c(0,4)) # Metz 1 - Lorient 2 # MTZ = cbind(MTZ,c(1,2)) LOR = cbind(LOR,c(2,1)) # Brest 0 - Nice 0 # B29 = cbind(B29,c(0,0)) NCE = cbind(NCE,c(0,0)) # Lyon 1 - Marseille 0 # LYO = cbind(LYO,c(1,0)) OLM = cbind(OLM,c(0,1)) ## Gameweek 21 ## # Marseille 1 - Metz 1 # OLM = cbind(OLM,c(1,1)) MTZ = cbind(MTZ,c(1,1)) # Lens 3 - Strasbourg 1 # LEN = cbind(LEN,c(3,1)) STR = cbind(STR,c(1,3)) # PSG 3 - LOSC 1 # PSG = cbind(PSG,c(3,1)) LIL = cbind(LIL,c(1,3)) # Le Havre 0 - Rennes 1 # LEH = cbind(LEH,c(0,1)) REN = cbind(REN,c(1,0)) # Lorient 2 - Reims 0 # LOR = cbind(LOR,c(2,0)) REI = cbind(REI,c(0,2)) # Clermont Foot 1 - Brest 1 # CLE = cbind(CLE,c(1,1)) B29 = cbind(B29,c(1,1)) # Toulouse 1 - Nantes 2 # TOU = cbind(TOU,c(1,2)) NAN = cbind(NAN,c(2,1)) # Montpellier 1 - Lyon 2 # MPL = cbind(MPL,c(1,2)) LYO = cbind(LYO,c(2,1)) # Nice 2 - Monaco 3 # NCE = cbind(NCE,c(2,3)) AMO = cbind(AMO,c(3,2)) ## Gameweek 22 ## # Lyon 1 - Nice 0 # LYO = cbind(LYO,c(1,0)) NCE = cbind(NCE,c(0,1)) # LOSC 3 - Le Havre 0 # LIL = cbind(LIL,c(3,0)) LEH = cbind(LEH,c(0,3)) # Nantes 0 - PSG 2 # NAN = cbind(NAN,c(0,2)) PSG = cbind(PSG,c(2,0)) # Strasbourg 1 - Lorient 3 # STR = cbind(STR,c(1,3)) LOR = cbind(LOR,c(3,1)) # Rennes 3 - Clermont Foot 1 # REN = cbind(REN,c(3,1)) CLE = cbind(CLE,c(1,3)) # Montpellier 3 - Metz 0 # MPL = cbind(MPL,c(3,0)) MTZ = cbind(MTZ,c(0,3)) # Monaco 1 - Toulouse 2 # AMO = cbind(AMO,c(1,2)) TOU = cbind(TOU,c(2,1)) # Reims 1 - Lens 1 # REI = cbind(REI,c(1,1)) LEN = cbind(LEN,c(1,1)) # Brest 1 - Marseille 0 # B29 = cbind(B29,c(1,0)) OLM = cbind(OLM,c(0,1)) ## Gameweek 23 ## # Metz 1 - Lyon 2 # MTZ = cbind(MTZ,c(1,2)) LYO = cbind(LYO,c(2,1)) # Lorient 0 - Nantes 1 # LOR = cbind(LOR,c(0,1)) NAN = cbind(NAN,c(1,0)) # Strasbourg 0 - Brest 3 # STR = cbind(STR,c(0,3)) B29 = cbind(B29,c(3,0)) # Lens 2 - Monaco 3 # LEN = cbind(LEN,c(2,3)) AMO = cbind(AMO,c(3,2)) # Le Havre 1 - Reims 2 # LEH = cbind(LEH,c(1,2)) REI = cbind(REI,c(2,1)) # Nice 0 - Clermont Foot 0 # NCE = cbind(NCE,c(0,0)) CLE = cbind(CLE,c(0,0)) # Toulouse 3 - LOSC 1 # TOU = cbind(TOU,c(3,1)) LIL = cbind(LIL,c(1,3)) # PSG 1 - Rennes 1 # PSG = cbind(PSG,c(1,1)) REN = cbind(REN,c(1,1)) # Marseille 4 - Montpellier 1 # OLM = cbind(OLM,c(4,1)) MPL = cbind(MPL,c(1,4)) ## Gameweek 24 ## # Monaco 0 - PSG 0 # AMO = cbind(AMO,c(0,0)) PSG = cbind(PSG,c(0,0)) # Reims 0 - LOSC 1 # REI = cbind(REI,c(0,1)) LIL = cbind(LIL,c(1,0)) # Clermont Foot 1 - Marseille 5 # CLE = cbind(CLE,c(1,5)) OLM = cbind(OLM,c(5,1)) # Toulouse 2 - Nice 1 # TOU = cbind(TOU,c(2,1)) NCE = cbind(NCE,c(1,2)) # Brest 1 - Le Havre 0 # B29 = cbind(B29,c(1,0)) LEH = cbind(LEH,c(0,1)) # Nantes 0 - Metz 2 # NAN = cbind(NAN,c(0,2)) MTZ = cbind(MTZ,c(2,0)) # Montpellier 2 - Strasbourg 2 # MPL = cbind(MPL,c(2,2)) STR = cbind(STR,c(2,2)) # Rennes 1 - Lorient 2 # REN = cbind(REN,c(1,2)) LOR = cbind(LOR,c(2,1)) # Lyon 0 - Lens 3 # LYO = cbind(LYO,c(0,3)) LEN = cbind(LEN,c(3,0)) ## Gameweek 25 ## # Nice 1 - Montpellier 2 # NCE = cbind(NCE,c(1,2)) MPL = cbind(MPL,c(2,1)) # Lorient 0 - Lyon 2 # LOR = cbind(LOR,c(0,2)) LYO = cbind(LYO,c(2,0)) # Lens 1 - Brest 0 # LEN = cbind(LEN,c(1,0)) B29 = cbind(B29,c(0,1)) # PSG 2 - Reims 2 # PSG = cbind(PSG,c(2,2)) REI = cbind(REI,c(2,2)) # Metz 1 - Clermont Foot 0 # MTZ = cbind(MTZ,c(1,0)) CLE = cbind(CLE,c(0,1)) # Strasbourg 0 - Monaco 1 # STR = cbind(STR,c(0,1)) AMO = cbind(AMO,c(1,0)) # Le Havre 1 - Toulouse 0 # LEH = cbind(LEH,c(1,0)) TOU = cbind(TOU,c(0,1)) # LOSC 2 - Rennes 2 # LIL = cbind(LIL,c(2,2)) REN = cbind(REN,c(2,2)) # Marseille 2 - Nantes 0 # OLM = cbind(OLM,c(2,0)) NAN = cbind(NAN,c(0,2)) ## Gameweek 26 ## # Toulouse 2 - Lyon 3 # TOU = cbind(TOU,c(2,3)) LYO = cbind(LYO,c(3,2)) # Nantes 1 - Strasbourg 3 # NAN = cbind(NAN,c(1,3)) STR = cbind(STR,c(3,1)) # Lens 1 - Nice 3 # LEN = cbind(LEN,c(1,3)) NCE = cbind(NCE,c(3,1)) # Brest 1 - LOSC 1 # B29 = cbind(B29,c(1,1)) LIL = cbind(LIL,c(1,1)) # Reims 2 - Metz 1 # REI = cbind(REI,c(2,1)) MTZ = cbind(MTZ,c(1,2)) # Clermont Foot 2 - Le Havre 1 # CLE = cbind(CLE,c(2,1)) LEH = cbind(LEH,c(1,2)) # Monaco 2 - Lorient 2 # AMO = cbind(AMO,c(2,2)) LOR = cbind(LOR,c(2,2)) # Rennes 2 - Marseille 0 # REN = cbind(REN,c(2,0)) OLM = cbind(OLM,c(0,2)) # Montpellier 2 - PSG 6 # MPL = cbind(MPL,c(2,6)) PSG = cbind(PSG,c(6,2)) ## Gameweek 27 ## # LOSC 2 - Lens 1 # LIL = cbind(LIL,c(2,1)) LEN = cbind(LEN,c(1,2)) # Metz 2 - Monaco 5 # MTZ = cbind(MTZ,c(2,5)) AMO = cbind(AMO,c(5,2)) # Lyon 1 - Reims 1 # LYO = cbind(LYO,c(1,1)) REI = cbind(REI,c(1,1)) # Lorient 0 - Brest 1 # LOR = cbind(LOR,c(0,1)) B29 = cbind(B29,c(1,0)) # Nice 1 - Nantes 2 # NCE = cbind(NCE,c(1,2)) NAN = cbind(NAN,c(2,1)) # Clermont Foot 0 - Toulouse 3 # CLE = cbind(CLE,c(0,3)) TOU = cbind(TOU,c(3,0)) # Le Havre 0 - Montpellier 2 # LEH = cbind(LEH,c(0,2)) MPL = cbind(MPL,c(2,0)) # Strasbourg 2 - Rennes 0 # STR = cbind(STR,c(2,0)) REN = cbind(REN,c(0,2)) # Marseille 0 - PSG 2 # OLM = cbind(OLM,c(0,2)) PSG = cbind(PSG,c(2,0)) ## Gameweek 28 ## # LOSC 3 - Marseille 1 # LIL = cbind(LIL,c(3,1)) OLM = cbind(OLM,c(1,3)) # Lens 1 - Le Havre 1 # LEN = cbind(LEN,c(1,1)) LEH = cbind(LEH,c(1,1)) # PSG 1 - Clermont Foot 1 # PSG = cbind(PSG,c(1,1)) CLE = cbind(CLE,c(1,1)) # Brest 4 - Metz 3 # B29 = cbind(B29,c(4,3)) MTZ = cbind(MTZ,c(3,4)) # Toulouse 0 - Strasbourg 0 # TOU = cbind(TOU,c(0,0)) STR = cbind(STR,c(0,0)) # Montpellier 2 - Lorient 0 # MPL = cbind(MPL,c(2,0)) LOR = cbind(LOR,c(0,2)) # Reims 0 - Nice 0 # REI = cbind(REI,c(0,0)) NCE = cbind(NCE,c(0,0)) # Monaco 1 - Rennes 0 # AMO = cbind(AMO,c(1,0)) REN = cbind(REN,c(0,1)) # Nantes 1 - Lyon 3 # NAN = cbind(NAN,c(1,3)) LYO = cbind(LYO,c(3,1)) ## Gameweek 29 ## # Metz 2 - Lens 1 # MTZ = cbind(MTZ,c(2,1)) LEN = cbind(LEN,c(1,2)) # Strasbourg 3 - Reims 1 # STR = cbind(STR,c(3,1)) REI = cbind(REI,c(1,3)) # Rennes 1 - Toulouse 2 # REN = cbind(REN,c(1,2)) TOU = cbind(TOU,c(2,1)) # Le Havre 0 - Nantes 1 # LEH = cbind(LEH,c(0,1)) NAN = cbind(NAN,c(1,0)) # Clermont Foot 1 - Montpellier 1 # CLE = cbind(CLE,c(1,1)) MPL = cbind(MPL,c(1,1)) # Lyon 4 - Brest 3 # LYO = cbind(LYO,c(4,3)) B29 = cbind(B29,c(3,4)) ## Gameweek 30 ## # Nice 3 - Lorient 0 # NCE = cbind(NCE,c(3,0)) LOR = cbind(LOR,c(0,3)) # Nantes 0 - Rennes 3 # NAN = cbind(NAN,c(0,3)) REN = cbind(REN,c(3,0)) # Lens 1 - Clermont Foot 0 # LEN = cbind(LEN,c(1,0)) CLE = cbind(CLE,c(0,1)) # Le Havre 0 - Metz 1 # LEH = cbind(LEH,c(0,1)) MTZ = cbind(MTZ,c(1,0)) # LOSC 1 - Strasbourg 0 # LIL = cbind(LIL,c(1,0)) STR = cbind(STR,c(0,1)) # Reims 1 - Montpellier 2 # REI = cbind(REI,c(1,2)) MPL = cbind(MPL,c(2,1)) # Brest 0 - Monaco 2 # B29 = cbind(B29,c(0,2)) AMO = cbind(AMO,c(2,0)) # Toulouse 2 - Marseille 2 # TOU = cbind(TOU,c(2,2)) OLM = cbind(OLM,c(2,2)) # PSG 4 - Lyon 1 # PSG = cbind(PSG,c(4,1)) LYO = cbind(LYO,c(1,4)) # Lorient 1 - PSG 4 # LOR = cbind(LOR,c(1,4)) PSG = cbind(PSG,c(4,1)) # Marseille 2 - Nice 2 # OLM = cbind(OLM,c(2,2)) NCE = cbind(NCE,c(2,2)) # Monaco 1 - LOSC 0 # AMO = cbind(AMO,c(1,0)) LIL = cbind(LIL,c(0,1)) ## Gameweek 31 ## # Montpellier 1 - Nantes 1 # MPL = cbind(MPL,c(1,1)) NAN = cbind(NAN,c(1,1)) # PSG 3 - Le Havre 3 # PSG = cbind(PSG,c(3,3)) LEH = cbind(LEH,c(3,3)) # Metz 1 - LOSC 2 # MTZ = cbind(MTZ,c(1,2)) LIL = cbind(LIL,c(2,1)) # Lorient 1 - Toulouse 2 # LOR = cbind(LOR,c(1,2)) TOU = cbind(TOU,c(2,1)) # Clermont Foot 4 - Reims 1 # CLE = cbind(CLE,c(4,1)) REI = cbind(REI,c(1,4)) # Strasbourg 1 - Nice 3 # STR = cbind(STR,c(1,3)) NCE = cbind(NCE,c(3,1)) # Rennes 4 - Brest 5 # REN = cbind(REN,c(4,5)) B29 = cbind(B29,c(5,4)) # Lyon 3 - Monaco 2 # LYO = cbind(LYO,c(3,2)) AMO = cbind(AMO,c(2,3)) # Marseille 2 - Lens 1 # OLM = cbind(OLM,c(2,1)) LEN = cbind(LEN,c(1,2)) ## Gameweek 32 ## # Toulouse 1 - Montpellier 2 # TOU = cbind(TOU,c(1,2)) MPL = cbind(MPL,c(2,1)) # Lens 2 - Lorient 0 # LEN = cbind(LEN,c(2,0)) LOR = cbind(LOR,c(0,2)) # Le Havre 3 - Strasbourg 1 # LEH = cbind(LEH,c(3,1)) STR = cbind(STR,c(1,3)) # Monaco 4 - Clermont Foot 1 # AMO = cbind(AMO,c(4,1)) CLE = cbind(CLE,c(1,4)) # Metz 2 - Rennes 3 # MTZ = cbind(MTZ,c(2,3)) REN = cbind(REN,c(3,2)) # Brest 0 - Nantes 0 # B29 = cbind(B29,c(0,0)) NAN = cbind(NAN,c(0,0)) # LOSC 3 - Lyon 4 # LIL = cbind(LIL,c(3,4)) LYO = cbind(LYO,c(4,3)) ## Gameweek 33 ## # Nice 1 - Le Havre 0 # NCE = cbind(NCE,c(1,0)) LEH = cbind(LEH,c(0,1)) # Brest 1 - Reims 1 # B29 = cbind(B29,c(1,1)) REI = cbind(REI,c(1,1)) # Clermont Foot 0 - Lyon 1 # CLE = cbind(CLE,c(0,1)) LYO = cbind(LYO,c(1,0)) # Nantes 1 - LOSC 2 # NAN = cbind(NAN,c(1,2)) LIL = cbind(LIL,c(2,1)) # Montpellier 0 - Monaco 2 # MPL = cbind(MPL,c(0,2)) AMO = cbind(AMO,c(2,0)) # PSG 1 - Toulouse 3 # PSG = cbind(PSG,c(1,3)) TOU = cbind(TOU,c(3,1)) # Marseille 3 - Lorient 1 # OLM = cbind(OLM,c(3,1)) LOR = cbind(LOR,c(1,3)) # Strasbourg 2 - Metz 1 # STR = cbind(STR,c(2,1)) MTZ = cbind(MTZ,c(1,2)) # Rennes 1 - Lens 1 # REN = cbind(REN,c(1,1)) LEN = cbind(LEN,c(1,1)) # Nice 1 - PSG 2 # NCE = cbind(NCE,c(1,2)) PSG = cbind(PSG,c(2,1)) # Reims 1 - Marseille 0 # REI = cbind(REI,c(1,0)) OLM = cbind(OLM,c(0,1)) ## Gameweek 34 ## # Reims 2 - Rennes 1 # REI = cbind(REI,c(2,1)) REN = cbind(REN,c(1,2)) # Le Havre 1 - Marseille 2 # LEH = cbind(LEH,c(1,2)) OLM = cbind(OLM,c(2,1)) # Lens 2 - Montpellier 2 # LEN = cbind(LEN,c(2,2)) MPL = cbind(MPL,c(2,2)) # Toulouse 0 - Brest 3 # TOU = cbind(TOU,c(0,3)) B29 = cbind(B29,c(3,0)) # Metz 0 - PSG 2 # MTZ = cbind(MTZ,c(0,2)) PSG = cbind(PSG,c(2,0)) # LOSC 2 - Nice 2 # LIL = cbind(LIL,c(2,2)) NCE = cbind(NCE,c(2,2)) # Monaco 4 - Nantes 0 # AMO = cbind(AMO,c(4,0)) NAN = cbind(NAN,c(0,4)) # Lyon 2 - Strasbourg 1 # LYO = cbind(LYO,c(2,1)) STR = cbind(STR,c(1,2)) # Lorient 5 - Clermont Foot 0 # LOR = cbind(LOR,c(5,0)) CLE = cbind(CLE,c(0,5)) ### 3. Complete table ### for (x in teams) { r = which(table$Team==x) X = eval(parse(text=x)) for (i in 1:ncol(X)) { table$GP[r] = table$GP[r] + 1 if (X[1,i] - X[2,i] > 0) { table$W[r] = table$W[r] + 1 table$Pts[r] = table$Pts[r] + 3 } else if (X[1,i] == X[2,i]) { table$D[r] = table$D[r] + 1 table$Pts[r] = table$Pts[r] + 1 } else { table$L[r] = table$L[r] + 1 } } table$GF[r] = sum(X[1,]) table$GA[r] = sum(X[2,]) table$GD[r] = table$GF[r] - table$GA[r] } ## Penalties # MPL 1-point penalty (crowd trouble) table$Pts[which(table$Team=="MPL")] = table$Pts[which(table$Team=="MPL")] - 1 table <- table[order(-table$Pts,-table$GD,-table$GF,table$Team),] row.names(table) <- 1:nrow(table) table