### 1. Create table ### col_head = c("Team","GP","W","D","L","GF","GA","GD","Pts") # Column headings teams = c("AJA","ALC","AZA","EXC","TWE","UTR","VLN","FEY","FST", "GAE","HEA","NEC","PEC","PSV","WAA","HEE","SPR","VIT") # 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 ## # FC Volendam 1 - Vitesse 2 # VLN = matrix(c(1,2),nrow=2) VIT = matrix(c(2,1),nrow=2) # PSV 2 - Utrecht 0 # PSV = matrix(c(2,0),nrow=2) UTR = matrix(c(0,2),nrow=2) # Heerenveen 3 - RKC Waalwijk 1 # HEE = matrix(c(3,1),nrow=2) WAA = matrix(c(1,3),nrow=2) # Ajax 4 - Heracles 1 # AJA = matrix(c(4,1),nrow=2) HEA = matrix(c(1,4),nrow=2) # PEC Zwolle 1 - Sparta Rotterdam 2 # PEC = matrix(c(1,2),nrow=2) SPR = matrix(c(2,1),nrow=2) # NEC 3 - Excelsior 4 # NEC = matrix(c(3,4),nrow=2) EXC = matrix(c(4,3),nrow=2) # Feyenoord 0 - Fortuna Sittard 0 # FEY = matrix(c(0,0),nrow=2) FST = matrix(c(0,0),nrow=2) # AZ Alkmaar 5 - Go Ahead Eagles 1 # AZA = matrix(c(5,1),nrow=2) GAE = matrix(c(1,5),nrow=2) # Almere 1 - Twente 4 # ALC = matrix(c(1,4),nrow=2) TWE = matrix(c(4,1),nrow=2) ## Gameweek 2 ## # Heracles 2 - NEC 1 # HEA = cbind(HEA,c(2,1)) NEC = cbind(NEC,c(1,2)) # Excelsior 2 - Ajax 2 # EXC = cbind(EXC,c(2,2)) AJA = cbind(AJA,c(2,2)) # Vitesse 1 - PSV 3 # VIT = cbind(VIT,c(1,3)) PSV = cbind(PSV,c(3,1)) # Fortuna Sittard 2 - Almere 1 # FST = cbind(FST,c(2,1)) ALC = cbind(ALC,c(1,2)) # Go Ahead Eagles 4 - FC Volendam 1 # GAE = cbind(GAE,c(4,1)) VLN = cbind(VLN,c(1,4)) # Utrecht 0 - Heerenveen 2 # UTR = cbind(UTR,c(0,2)) HEE = cbind(HEE,c(2,0)) # Twente 3 - PEC Zwolle 1 # TWE = cbind(TWE,c(3,1)) PEC = cbind(PEC,c(1,3)) # Sparta Rotterdam 2 - Feyenoord 2 # SPR = cbind(SPR,c(2,2)) FEY = cbind(FEY,c(2,2)) # RKC Waalwijk 1 - AZ Alkmaar 3 # WAA = cbind(WAA,c(1,3)) AZA = cbind(AZA,c(3,1)) ## Gameweek 3 ## # NEC 3 - RKC Waalwijk 0 # NEC = cbind(NEC,c(3,0)) WAA = cbind(WAA,c(0,3)) # Excelsior 2 - Fortuna Sittard 2 # EXC = cbind(EXC,c(2,2)) FST = cbind(FST,c(2,2)) # PEC Zwolle 1 - Utrecht 0 # PEC = cbind(PEC,c(1,0)) UTR = cbind(UTR,c(0,1)) # Feyenoord 6 - Almere 1 # FEY = cbind(FEY,c(6,1)) ALC = cbind(ALC,c(1,6)) # Heerenveen 1 - Sparta Rotterdam 3 # HEE = cbind(HEE,c(1,3)) SPR = cbind(SPR,c(3,1)) ## Gameweek 4 ## # Sparta Rotterdam 1 - NEC 1 # SPR = cbind(SPR,c(1,1)) NEC = cbind(NEC,c(1,1)) # Almere 1 - PEC Zwolle 2 # ALC = cbind(ALC,c(1,2)) PEC = cbind(PEC,c(2,1)) # Go Ahead Eagles 3 - Heerenveen 2 # GAE = cbind(GAE,c(3,2)) HEE = cbind(HEE,c(2,3)) # RKC Waalwijk 0 - PSV 4 # WAA = cbind(WAA,c(0,4)) PSV = cbind(PSV,c(4,0)) # Heracles 3 - Excelsior 1 # HEA = cbind(HEA,c(3,1)) EXC = cbind(EXC,c(1,3)) # Utrecht 1 - Feyenoord 5 # UTR = cbind(UTR,c(1,5)) FEY = cbind(FEY,c(5,1)) # FC Volendam 0 - Twente 2 # VLN = cbind(VLN,c(0,2)) TWE = cbind(TWE,c(2,0)) # Fortuna Sittard 0 - Ajax 0 # FST = cbind(FST,c(0,0)) AJA = cbind(AJA,c(0,0)) # Vitesse 0 - AZ Alkmaar 2 # VIT = cbind(VIT,c(0,2)) AZA = cbind(AZA,c(2,0)) ## Gameweek 5 ## # Feyenoord 6 - Heerenveen 1 # FEY = cbind(FEY,c(6,1)) HEE = cbind(HEE,c(1,6)) # Vitesse 0 - RKC Waalwijk 2 # VIT = cbind(VIT,c(0,2)) WAA = cbind(WAA,c(2,0)) # PSV 4 - NEC 0 # PSV = cbind(PSV,c(4,0)) NEC = cbind(NEC,c(0,4)) # Fortuna Sittard 3 - FC Volendam 1 # FST = cbind(FST,c(3,1)) VLN = cbind(VLN,c(1,3)) # Heracles 1 - Utrecht 3 # HEA = cbind(HEA,c(1,3)) UTR = cbind(UTR,c(3,1)) # PEC Zwolle 1 - Go Ahead Eagles 1 # PEC = cbind(PEC,c(1,1)) GAE = cbind(GAE,c(1,1)) # Excelsior 0 - Almere 0 # EXC = cbind(EXC,c(0,0)) ALC = cbind(ALC,c(0,0)) # Twente 3 - Ajax 1 # TWE = cbind(TWE,c(3,1)) AJA = cbind(AJA,c(1,3)) # AZ Alkmaar 2 - Sparta Rotterdam 0 # AZA = cbind(AZA,c(2,0)) SPR = cbind(SPR,c(0,2)) ## Gameweek 6 ## # Go Ahead Eagles 3 - Fortuna Sittard 0 # GAE = cbind(GAE,c(3,0)) FST = cbind(FST,c(0,3)) # FC Volendam 2 - Heracles 2 # VLN = cbind(VLN,c(2,2)) HEA = cbind(HEA,c(2,2)) # NEC 3 - Utrecht 0 # NEC = cbind(NEC,c(3,0)) UTR = cbind(UTR,c(0,3)) # Almere 0 - PSV 4 # ALC = cbind(ALC,c(0,4)) PSV = cbind(PSV,c(4,0)) # Heerenveen 0 - Excelsior 3 # HEE = cbind(HEE,c(0,3)) EXC = cbind(EXC,c(3,0)) # Sparta Rotterdam 1 - Vitesse 0 # SPR = cbind(SPR,c(1,0)) VIT = cbind(VIT,c(0,1)) # PEC Zwolle 0 - AZ Alkmaar 3 # PEC = cbind(PEC,c(0,3)) AZA = cbind(AZA,c(3,0)) # RKC Waalwijk 1 - Twente 0 # WAA = cbind(WAA,c(1,0)) TWE = cbind(TWE,c(0,1)) # Ajax 0 - Feyenoord 4 # AJA = cbind(AJA,c(0,4)) FEY = cbind(FEY,c(4,0)) # PSV 3 - Go Ahead Eagles 0 # PSV = cbind(PSV,c(3,0)) GAE = cbind(GAE,c(0,3)) # Twente 1 - Vitesse 0 # TWE = cbind(TWE,c(1,0)) VIT = cbind(VIT,c(0,1)) # AZ Alkmaar 1 - Heracles 1 # AZA = cbind(AZA,c(1,1)) HEA = cbind(HEA,c(1,1)) ## Gameweek 7 ## # Feyenoord 3 - Go Ahead Eagles 1 # FEY = cbind(FEY,c(3,1)) GAE = cbind(GAE,c(1,3)) # Utrecht 0 - Almere 2 # UTR = cbind(UTR,c(0,2)) ALC = cbind(ALC,c(2,0)) # PSV 3 - FC Volendam 1 # PSV = cbind(PSV,c(3,1)) VLN = cbind(VLN,c(1,3)) # Twente 1 - Heerenveen 0 # TWE = cbind(TWE,c(1,0)) HEE = cbind(HEE,c(0,1)) # NEC 1 - Vitesse 3 # NEC = cbind(NEC,c(1,3)) VIT = cbind(VIT,c(3,1)) # Heracles 2 - PEC Zwolle 1 # HEA = cbind(HEA,c(2,1)) PEC = cbind(PEC,c(1,2)) # Excelsior 2 - Sparta Rotterdam 1 # EXC = cbind(EXC,c(2,1)) SPR = cbind(SPR,c(1,2)) # AZ Alkmaar 4 - Fortuna Sittard 0 # AZA = cbind(AZA,c(4,0)) FST = cbind(FST,c(0,4)) ## Gameweek 8 ## # FC Volendam 1 - Utrecht 0 # VLN = cbind(VLN,c(1,0)) UTR = cbind(UTR,c(0,1)) # Heerenveen 1 - NEC 1 # HEE = cbind(HEE,c(1,1)) NEC = cbind(NEC,c(1,1)) # Almere 1 - RKC Waalwijk 0 # ALC = cbind(ALC,c(1,0)) WAA = cbind(WAA,c(0,1)) # Go Ahead Eagles 4 - Heracles 0 # GAE = cbind(GAE,c(4,0)) HEA = cbind(HEA,c(0,4)) # Vitesse 0 - Excelsior 0 # VIT = cbind(VIT,c(0,0)) EXC = cbind(EXC,c(0,0)) # PEC Zwolle 0 - Feyenoord 2 # PEC = cbind(PEC,c(0,2)) FEY = cbind(FEY,c(2,0)) # Ajax 1 - AZ Alkmaar 2 # AJA = cbind(AJA,c(1,2)) AZA = cbind(AZA,c(2,1)) # Fortuna Sittard 0 - Twente 3 # FST = cbind(FST,c(0,3)) TWE = cbind(TWE,c(3,0)) # Sparta Rotterdam 0 - PSV 4 # SPR = cbind(SPR,c(0,4)) PSV = cbind(PSV,c(4,0)) ## Gameweek 9 ## # RKC Waalwijk 2 - FC Volendam 1 # WAA = cbind(WAA,c(2,1)) VLN = cbind(VLN,c(1,2)) # PSV 3 - Fortuna Sittard 1 # PSV = cbind(PSV,c(3,1)) FST = cbind(FST,c(1,3)) # NEC 1 - Almere 1 # NEC = cbind(NEC,c(1,1)) ALC = cbind(ALC,c(1,1)) # AZ Alkmaar 3 - Heerenveen 0 # AZA = cbind(AZA,c(3,0)) HEE = cbind(HEE,c(0,3)) # Feyenoord 4 - Vitesse 0 # FEY = cbind(FEY,c(4,0)) VIT = cbind(VIT,c(0,4)) # Utrecht 4 - Ajax 3 # UTR = cbind(UTR,c(4,3)) AJA = cbind(AJA,c(3,4)) # Heracles 2 - Twente 2 # HEA = cbind(HEA,c(2,2)) TWE = cbind(TWE,c(2,2)) # Excelsior 2 - PEC Zwolle 4 # EXC = cbind(EXC,c(2,4)) PEC = cbind(PEC,c(4,2)) # Go Ahead Eagles 0 - Sparta Rotterdam 0 # GAE = cbind(GAE,c(0,0)) SPR = cbind(SPR,c(0,0)) ## Gameweek 10 ## # Vitesse 1 - PEC Zwolle 1 # VIT = cbind(VIT,c(1,1)) PEC = cbind(PEC,c(1,1)) # Heerenveen 3 - Heracles 0 # HEE = cbind(HEE,c(3,0)) HEA = cbind(HEA,c(0,3)) # Almere 0 - Go Ahead Eagles 0 # ALC = cbind(ALC,c(0,0)) GAE = cbind(GAE,c(0,0)) # Sparta Rotterdam 2 - RKC Waalwijk 0 # SPR = cbind(SPR,c(2,0)) WAA = cbind(WAA,c(0,2)) # Fortuna Sittard 0 - Utrecht 0 # FST = cbind(FST,c(0,0)) UTR = cbind(UTR,c(0,0)) # Twente 2 - Feyenoord 1 # TWE = cbind(TWE,c(2,1)) FEY = cbind(FEY,c(1,2)) # PSV 5 - Ajax 2 # PSV = cbind(PSV,c(5,2)) AJA = cbind(AJA,c(2,5)) # FC Volendam 3 - Excelsior 1 # VLN = cbind(VLN,c(3,1)) EXC = cbind(EXC,c(1,3)) # Ajax 2 - FC Volendam 0 # AJA = cbind(AJA,c(2,0)) VLN = cbind(VLN,c(0,2)) ## Gameweek 11 ## # Heracles 0 - PSV 6 # HEA = cbind(HEA,c(0,6)) PSV = cbind(PSV,c(6,0)) # RKC Waalwijk 1 - Feyenoord 2 # WAA = cbind(WAA,c(1,2)) FEY = cbind(FEY,c(2,1)) # Excelsior 1 - AZ Alkmaar 1 # EXC = cbind(EXC,c(1,1)) AZA = cbind(AZA,c(1,1)) # Go Ahead Eagles 5 - Vitesse 1 # GAE = cbind(GAE,c(5,1)) VIT = cbind(VIT,c(1,5)) # Utrecht 1 - Twente 1 # UTR = cbind(UTR,c(1,1)) TWE = cbind(TWE,c(1,1)) # NEC 3 - FC Volendam 3 # NEC = cbind(NEC,c(3,3)) VLN = cbind(VLN,c(3,3)) # PEC Zwolle 2 - Fortuna Sittard 0 # PEC = cbind(PEC,c(2,0)) FST = cbind(FST,c(0,2)) # Sparta Rotterdam 1 - Almere 2 # SPR = cbind(SPR,c(1,2)) ALC = cbind(ALC,c(2,1)) # Ajax 4 - Heerenveen 1 # AJA = cbind(AJA,c(4,1)) HEE = cbind(HEE,c(1,4)) ## Gameweek 12 ## # Fortuna Sittard 4 - Heracles 1 # FST = cbind(FST,c(4,1)) HEA = cbind(HEA,c(1,4)) # RKC Waalwijk 0 - Go Ahead Eagles 1 # WAA = cbind(WAA,c(0,1)) GAE = cbind(GAE,c(1,0)) # Twente 3 - NEC 3 # TWE = cbind(TWE,c(3,3)) NEC = cbind(NEC,c(3,3)) # Vitesse 1 - Heerenveen 3 # VIT = cbind(VIT,c(1,3)) HEE = cbind(HEE,c(3,1)) # PSV 4 - PEC Zwolle 0 # PSV = cbind(PSV,c(4,0)) PEC = cbind(PEC,c(0,4)) # Almere 2 - Ajax 2 # ALC = cbind(ALC,c(2,2)) AJA = cbind(AJA,c(2,2)) # FC Volendam 1 - Sparta Rotterdam 4 # VLN = cbind(VLN,c(1,4)) SPR = cbind(SPR,c(4,1)) # Feyenoord 1 - AZ Alkmaar 0 # FEY = cbind(FEY,c(1,0)) AZA = cbind(AZA,c(0,1)) # Utrecht 2 - Excelsior 2 # UTR = cbind(UTR,c(2,2)) EXC = cbind(EXC,c(2,2)) ## Gameweek 13 ## # Excelsior 2 - Feyenoord 4 # EXC = cbind(EXC,c(2,4)) FEY = cbind(FEY,c(4,2)) # Heerenveen 3 - Fortuna Sittard 0 # HEE = cbind(HEE,c(3,0)) FST = cbind(FST,c(0,3)) # Twente 0 - PSV 3 # TWE = cbind(TWE,c(0,3)) PSV = cbind(PSV,c(3,0)) # PEC Zwolle 1 - RKC Waalwijk 2 # PEC = cbind(PEC,c(1,2)) WAA = cbind(WAA,c(2,1)) # Ajax 5 - Vitesse 0 # AJA = cbind(AJA,c(5,0)) VIT = cbind(VIT,c(0,5)) # Almere 0 - Heracles 5 # ALC = cbind(ALC,c(0,5)) HEA = cbind(HEA,c(5,0)) # AZ Alkmaar 3 - FC Volendam 0 # AZA = cbind(AZA,c(3,0)) VLN = cbind(VLN,c(0,3)) # NEC 1 - Go Ahead Eagles 1 # NEC = cbind(NEC,c(1,1)) GAE = cbind(GAE,c(1,1)) # Sparta Rotterdam 1 - Utrecht 2 # SPR = cbind(SPR,c(1,2)) UTR = cbind(UTR,c(2,1)) ## Gameweek 14 ## # Heerenveen 3 - Almere 0 # HEE = cbind(HEE,c(3,0)) ALC = cbind(ALC,c(0,3)) # FC Volendam 0 - PEC Zwolle 5 # VLN = cbind(VLN,c(0,5)) PEC = cbind(PEC,c(5,0)) # Fortuna Sittard 3 - Vitesse 1 # FST = cbind(FST,c(3,1)) VIT = cbind(VIT,c(1,3)) # RKC Waalwijk 2 - Excelsior 2 # WAA = cbind(WAA,c(2,2)) EXC = cbind(EXC,c(2,2)) # Heracles 0 - Sparta Rotterdam 1 # HEA = cbind(HEA,c(0,1)) SPR = cbind(SPR,c(1,0)) # Feyenoord 1 - PSV 2 # FEY = cbind(FEY,c(1,2)) PSV = cbind(PSV,c(2,1)) # NEC 1 - Ajax 2 # NEC = cbind(NEC,c(1,2)) AJA = cbind(AJA,c(2,1)) # Go Ahead Eagles 1 - Twente 3 # GAE = cbind(GAE,c(1,3)) TWE = cbind(TWE,c(3,1)) # Utrecht 1 - AZ Alkmaar 1 # UTR = cbind(UTR,c(1,1)) AZA = cbind(AZA,c(1,1)) # RKC Waalwijk 2 - Ajax 3 # WAA = cbind(WAA,c(2,3)) AJA = cbind(AJA,c(3,2)) # AZ Alkmaar 1 - NEC 2 # AZA = cbind(AZA,c(1,2)) NEC = cbind(NEC,c(2,1)) ## Gameweek 15 ## # PSV 2 - Heerenveen 0 # PSV = cbind(PSV,c(2,0)) HEE = cbind(HEE,c(0,2)) # Feyenoord 3 - FC Volendam 1 # FEY = cbind(FEY,c(3,1)) VLN = cbind(VLN,c(1,3)) # Twente 4 - Excelsior 2 # TWE = cbind(TWE,c(4,2)) EXC = cbind(EXC,c(2,4)) # Ajax 2 - Sparta Rotterdam 1 # AJA = cbind(AJA,c(2,1)) SPR = cbind(SPR,c(1,2)) # PEC Zwolle 1 - NEC 3 # PEC = cbind(PEC,c(1,3)) NEC = cbind(NEC,c(3,1)) # AZ Alkmaar 4 - Almere 1 # AZA = cbind(AZA,c(4,1)) ALC = cbind(ALC,c(1,4)) # Go Ahead Eagles 0 - Utrecht 2 # GAE = cbind(GAE,c(0,2)) UTR = cbind(UTR,c(2,0)) # Fortuna Sittard 1 - RKC Waalwijk 0 # FST = cbind(FST,c(1,0)) WAA = cbind(WAA,c(0,1)) # Vitesse 2 - Heracles 0 # VIT = cbind(VIT,c(2,0)) HEA = cbind(HEA,c(0,2)) ## Gameweek 16 ## # NEC 4 - Fortuna Sittard 1 # NEC = cbind(NEC,c(4,1)) FST = cbind(FST,c(1,4)) # Utrecht 1 - RKC Waalwijk 1 # UTR = cbind(UTR,c(1,1)) WAA = cbind(WAA,c(1,1)) # Excelsior 1 - Go Ahead Eagles 1 # EXC = cbind(EXC,c(1,1)) GAE = cbind(GAE,c(1,1)) # Heerenveen 1 - FC Volendam 2 # HEE = cbind(HEE,c(1,2)) VLN = cbind(VLN,c(2,1)) # Almere 5 - Vitesse 0 # ALC = cbind(ALC,c(5,0)) VIT = cbind(VIT,c(0,5)) # Heracles 0 - Feyenoord 4 # HEA = cbind(HEA,c(0,4)) FEY = cbind(FEY,c(4,0)) # Sparta Rotterdam 2 - Twente 2 # SPR = cbind(SPR,c(2,2)) TWE = cbind(TWE,c(2,2)) # Ajax 2 - PEC Zwolle 2 # AJA = cbind(AJA,c(2,2)) PEC = cbind(PEC,c(2,2)) # AZ Alkmaar 0 - PSV 4 # AZA = cbind(AZA,c(0,4)) PSV = cbind(PSV,c(4,0)) ## Gameweek 17 ## # RKC Waalwijk 1 - Heracles 2 # WAA = cbind(WAA,c(1,2)) HEA = cbind(HEA,c(2,1)) # Fortuna Sittard 0 - Sparta Rotterdam 2 # FST = cbind(FST,c(0,2)) SPR = cbind(SPR,c(2,0)) # Twente 2 - AZ Alkmaar 1 # TWE = cbind(TWE,c(2,1)) AZA = cbind(AZA,c(1,2)) # PEC Zwolle 2 - Heerenveen 2 # PEC = cbind(PEC,c(2,2)) HEE = cbind(HEE,c(2,2)) # PSV 3 - Excelsior 1 # PSV = cbind(PSV,c(3,1)) EXC = cbind(EXC,c(1,3)) # FC Volendam 0 - Almere 1 # VLN = cbind(VLN,c(0,1)) ALC = cbind(ALC,c(1,0)) # Vitesse 0 - Utrecht 0 # VIT = cbind(VIT,c(0,0)) UTR = cbind(UTR,c(0,0)) # Go Ahead Eagles 2 - Ajax 3 # GAE = cbind(GAE,c(2,3)) AJA = cbind(AJA,c(3,2)) # Feyenoord 2 - NEC 2 # FEY = cbind(FEY,c(2,2)) NEC = cbind(NEC,c(2,2)) ## Gameweek 18 ## # Excelsior 3 - Heerenveen 0 # EXC = cbind(EXC,c(3,0)) HEE = cbind(HEE,c(0,3)) # NEC 1 - Twente 0 # NEC = cbind(NEC,c(1,0)) TWE = cbind(TWE,c(0,1)) # Heracles 1 - FC Volendam 1 # HEA = cbind(HEA,c(1,1)) VLN = cbind(VLN,c(1,1)) # AZ Alkmaar 2 - PEC Zwolle 2 # AZA = cbind(AZA,c(2,2)) PEC = cbind(PEC,c(2,2)) # Utrecht 1 - PSV 1 # UTR = cbind(UTR,c(1,1)) PSV = cbind(PSV,c(1,1)) # Sparta Rotterdam 0 - Go Ahead Eagles 2 # SPR = cbind(SPR,c(0,2)) GAE = cbind(GAE,c(2,0)) # Vitesse 1 - Feyenoord 2 # VIT = cbind(VIT,c(1,2)) FEY = cbind(FEY,c(2,1)) # Ajax 4 - RKC Waalwijk 1 # AJA = cbind(AJA,c(4,1)) WAA = cbind(WAA,c(1,4)) # Almere 0 - Fortuna Sittard 0 # ALC = cbind(ALC,c(0,0)) FST = cbind(FST,c(0,0)) ## Gameweek 19 ## # PEC Zwolle 1 - Vitesse 0 # PEC = cbind(PEC,c(1,0)) VIT = cbind(VIT,c(0,1)) # RKC Waalwijk 1 - Sparta Rotterdam 1 # WAA = cbind(WAA,c(1,1)) SPR = cbind(SPR,c(1,1)) # PSV 2 - Almere 0 # PSV = cbind(PSV,c(2,0)) ALC = cbind(ALC,c(0,2)) # Heracles 2 - Ajax 4 # HEA = cbind(HEA,c(2,4)) AJA = cbind(AJA,c(4,2)) # Excelsior 1 - Utrecht 1 # EXC = cbind(EXC,c(1,1)) UTR = cbind(UTR,c(1,1)) # Heerenveen 2 - AZ Alkmaar 2 # HEE = cbind(HEE,c(2,2)) AZA = cbind(AZA,c(2,2)) # Go Ahead Eagles 2 - NEC 2 # GAE = cbind(GAE,c(2,2)) NEC = cbind(NEC,c(2,2)) # Feyenoord 0 - Twente 0 # FEY = cbind(FEY,c(0,0)) TWE = cbind(TWE,c(0,0)) # FC Volendam 0 - Fortuna Sittard 1 # VLN = cbind(VLN,c(0,1)) FST = cbind(FST,c(1,0)) ## Gameweek 20 ## # Almere 2 - Excelsior 1 # ALC = cbind(ALC,c(2,1)) EXC = cbind(EXC,c(1,2)) # Twente 3 - RKC Waalwijk 0 # TWE = cbind(TWE,c(3,0)) WAA = cbind(WAA,c(0,3)) # Fortuna Sittard 3 - Heerenveen 3 # FST = cbind(FST,c(3,3)) HEE = cbind(HEE,c(3,3)) # Ajax 1 - PSV 1 # AJA = cbind(AJA,c(1,1)) PSV = cbind(PSV,c(1,1)) # NEC 3 - Heracles 1 # NEC = cbind(NEC,c(3,1)) HEA = cbind(HEA,c(1,3)) # Vitesse 0 - Go Ahead Eagles 2 # VIT = cbind(VIT,c(0,2)) GAE = cbind(GAE,c(2,0)) # Utrecht 4 - FC Volendam 2 # UTR = cbind(UTR,c(4,2)) VLN = cbind(VLN,c(2,4)) # AZ Alkmaar 0 - Feyenoord 1 # AZA = cbind(AZA,c(0,1)) FEY = cbind(FEY,c(1,0)) # Sparta Rotterdam 0 - PEC Zwolle 2 # SPR = cbind(SPR,c(0,2)) PEC = cbind(PEC,c(2,0)) ## Gameweek 21 ## # RKC Waalwijk 2 - NEC 0 # WAA = cbind(WAA,c(2,0)) NEC = cbind(NEC,c(0,2)) # Excelsior 0 - Twente 3 # EXC = cbind(EXC,c(0,3)) TWE = cbind(TWE,c(3,0)) # Almere 0 - AZ Alkmaar 0 # ALC = cbind(ALC,c(0,0)) AZA = cbind(AZA,c(0,0)) # Heracles 3 - Vitesse 2 # HEA = cbind(HEA,c(3,2)) VIT = cbind(VIT,c(2,3)) # Go Ahead Eagles 1 - PEC Zwolle 1 # GAE = cbind(GAE,c(1,1)) PEC = cbind(PEC,c(1,1)) # Heerenveen 3 - Ajax 2 # HEE = cbind(HEE,c(3,2)) AJA = cbind(AJA,c(2,3)) # Utrecht 4 - Fortuna Sittard 0 # UTR = cbind(UTR,c(4,0)) FST = cbind(FST,c(0,4)) # FC Volendam 1 - PSV 5 # VLN = cbind(VLN,c(1,5)) PSV = cbind(PSV,c(5,1)) # Feyenoord 2 - Sparta Rotterdam 0 # FEY = cbind(FEY,c(2,0)) SPR = cbind(SPR,c(0,2)) ## Gameweek 22 ## # PSV 2 - Heracles 0 # PSV = cbind(PSV,c(2,0)) HEA = cbind(HEA,c(0,2)) # Sparta Rotterdam 4 - Excelsior 2 # SPR = cbind(SPR,c(4,2)) EXC = cbind(EXC,c(2,4)) # Fortuna Sittard 1 - AZ Alkmaar 2 # FST = cbind(FST,c(1,2)) AZA = cbind(AZA,c(2,1)) # Heerenveen 0 - Go Ahead Eagles 2 # HEE = cbind(HEE,c(0,2)) GAE = cbind(GAE,c(2,0)) # PEC Zwolle 0 - Almere 1 # PEC = cbind(PEC,c(0,1)) ALC = cbind(ALC,c(1,0)) # Twente 0 - Utrecht 1 # TWE = cbind(TWE,c(0,1)) UTR = cbind(UTR,c(1,0)) # Ajax 2 - NEC 2 # AJA = cbind(AJA,c(2,2)) NEC = cbind(NEC,c(2,2)) # Vitesse 1 - FC Volendam 1 # VIT = cbind(VIT,c(1,1)) VLN = cbind(VLN,c(1,1)) # Feyenoord 1 - RKC Waalwijk 0 # FEY = cbind(FEY,c(1,0)) WAA = cbind(WAA,c(0,1)) ## Gameweek 23 ## # Utrecht 1 - Heracles 0 # UTR = cbind(UTR,c(1,0)) HEA = cbind(HEA,c(0,1)) # RKC Waalwijk 0 - Fortuna Sittard 1 # WAA = cbind(WAA,c(0,1)) FST = cbind(FST,c(1,0)) # PEC Zwolle 1 - PSV 7 # PEC = cbind(PEC,c(1,7)) PSV = cbind(PSV,c(7,1)) # NEC 2 - Sparta Rotterdam 0 # NEC = cbind(NEC,c(2,0)) SPR = cbind(SPR,c(0,2)) # Excelsior 1 - Vitesse 2 # EXC = cbind(EXC,c(1,2)) VIT = cbind(VIT,c(2,1)) # Twente 3 - Go Ahead Eagles 0 # TWE = cbind(TWE,c(3,0)) GAE = cbind(GAE,c(0,3)) # Almere 0 - Feyenoord 2 # ALC = cbind(ALC,c(0,2)) FEY = cbind(FEY,c(2,0)) # AZ Alkmaar 2 - Ajax 0 # AZA = cbind(AZA,c(2,0)) AJA = cbind(AJA,c(0,2)) # FC Volendam 0 - Heerenveen 4 # VLN = cbind(VLN,c(0,4)) HEE = cbind(HEE,c(4,0)) ## Gameweek 24 ## # FC Volendam 2 - NEC 5 # VLN = cbind(VLN,c(2,5)) NEC = cbind(NEC,c(5,2)) # Go Ahead Eagles 1 - RKC Waalwijk 0 # GAE = cbind(GAE,c(1,0)) WAA = cbind(WAA,c(0,1)) # Vitesse 1 - Twente 2 # VIT = cbind(VIT,c(1,2)) TWE = cbind(TWE,c(2,1)) # Sparta Rotterdam 1 - AZ Alkmaar 1 # SPR = cbind(SPR,c(1,1)) AZA = cbind(AZA,c(1,1)) # Ajax 2 - Utrecht 0 # AJA = cbind(AJA,c(2,0)) UTR = cbind(UTR,c(0,2)) # PSV 2 - Feyenoord 2 # PSV = cbind(PSV,c(2,2)) FEY = cbind(FEY,c(2,2)) # Heerenveen 2 - PEC Zwolle 0 # HEE = cbind(HEE,c(2,0)) PEC = cbind(PEC,c(0,2)) # Fortuna Sittard 5 - Excelsior 2 # FST = cbind(FST,c(5,2)) EXC = cbind(EXC,c(2,5)) # Heracles 2 - Almere 2 # HEA = cbind(HEA,c(2,2)) ALC = cbind(ALC,c(2,2)) ## Gameweek 25 ## # Go Ahead Eagles 0 - PSV 1 # GAE = cbind(GAE,c(0,1)) PSV = cbind(PSV,c(1,0)) # Twente 2 - Sparta Rotterdam 1 # TWE = cbind(TWE,c(2,1)) SPR = cbind(SPR,c(1,2)) # Almere 1 - Utrecht 1 # ALC = cbind(ALC,c(1,1)) UTR = cbind(UTR,c(1,1)) # RKC Waalwijk 3 - Vitesse 1 # WAA = cbind(WAA,c(3,1)) VIT = cbind(VIT,c(1,3)) # AZ Alkmaar 4 - Excelsior 0 # AZA = cbind(AZA,c(4,0)) EXC = cbind(EXC,c(0,4)) # PEC Zwolle 1 - FC Volendam 1 # PEC = cbind(PEC,c(1,1)) VLN = cbind(VLN,c(1,1)) # Ajax 2 - Fortuna Sittard 2 # AJA = cbind(AJA,c(2,2)) FST = cbind(FST,c(2,2)) # NEC 2 - Heerenveen 0 # NEC = cbind(NEC,c(2,0)) HEE = cbind(HEE,c(0,2)) # Feyenoord 3 - Heracles 0 # FEY = cbind(FEY,c(3,0)) HEA = cbind(HEA,c(0,3)) ## Gameweek 26 ## # Heracles 2 - Go Ahead Eagles 0 # HEA = cbind(HEA,c(2,0)) GAE = cbind(GAE,c(0,2)) # Fortuna Sittard 3 - PEC Zwolle 1 # FST = cbind(FST,c(3,1)) PEC = cbind(PEC,c(1,3)) # Excelsior 1 - RKC Waalwijk 1 # EXC = cbind(EXC,c(1,1)) WAA = cbind(WAA,c(1,1)) # Vitesse 1 - Almere 1 # VIT = cbind(VIT,c(1,1)) ALC = cbind(ALC,c(1,1)) # FC Volendam 0 - AZ Alkmaar 4 # VLN = cbind(VLN,c(0,4)) AZA = cbind(AZA,c(4,0)) # Heerenveen 2 - Feyenoord 3 # HEE = cbind(HEE,c(2,3)) FEY = cbind(FEY,c(3,2)) # Utrecht 1 - NEC 0 # UTR = cbind(UTR,c(1,0)) NEC = cbind(NEC,c(0,1)) # Sparta Rotterdam 2 - Ajax 2 # SPR = cbind(SPR,c(2,2)) AJA = cbind(AJA,c(2,2)) # PSV 1 - Twente 0 # PSV = cbind(PSV,c(1,0)) TWE = cbind(TWE,c(0,1)) ## Gameweek 27 ## # NEC 3 - PSV 1 # NEC = cbind(NEC,c(3,1)) PSV = cbind(PSV,c(1,3)) # Sparta Rotterdam 4 - Fortuna Sittard 0 # SPR = cbind(SPR,c(4,0)) FST = cbind(FST,c(0,4)) # Go Ahead Eagles 3 - Excelsior 0 # GAE = cbind(GAE,c(3,0)) EXC = cbind(EXC,c(0,3)) # RKC Waalwijk 1 - Heerenveen 1 # WAA = cbind(WAA,c(1,1)) HEE = cbind(HEE,c(1,1)) # AZ Alkmaar 2 - Vitesse 0 # AZA = cbind(AZA,c(2,0)) VIT = cbind(VIT,c(0,2)) # PEC Zwolle 1 - Ajax 3 # PEC = cbind(PEC,c(1,3)) AJA = cbind(AJA,c(3,1)) # Feyenoord 4 - Utrecht 2 # FEY = cbind(FEY,c(4,2)) UTR = cbind(UTR,c(2,4)) # Twente 1 - Heracles 0 # TWE = cbind(TWE,c(1,0)) HEA = cbind(HEA,c(0,1)) # Almere 1 - FC Volendam 1 # ALC = cbind(ALC,c(1,1)) VLN = cbind(VLN,c(1,1)) ## Gameweek 28 ## # Vitesse 1 - Sparta Rotterdam 4 # VIT = cbind(VIT,c(1,4)) SPR = cbind(SPR,c(4,1)) # Excelsior 0 - PSV 2 # EXC = cbind(EXC,c(0,2)) PSV = cbind(PSV,c(2,0)) # Fortuna Sittard 1 - NEC 1 # FST = cbind(FST,c(1,1)) NEC = cbind(NEC,c(1,1)) # Heracles 5 - AZ Alkmaar 0 # HEA = cbind(HEA,c(5,0)) AZA = cbind(AZA,c(0,5)) # Utrecht 5 - PEC Zwolle 1 # UTR = cbind(UTR,c(5,1)) PEC = cbind(PEC,c(1,5)) # Heerenveen 3 - Twente 3 # HEE = cbind(HEE,c(3,3)) TWE = cbind(TWE,c(3,3)) # FC Volendam 0 - Feyenoord 0 # VLN = cbind(VLN,c(0,0)) FEY = cbind(FEY,c(0,0)) # RKC Waalwijk 0 - Almere 0 # WAA = cbind(WAA,c(0,0)) ALC = cbind(ALC,c(0,0)) # Ajax 1 - Go Ahead Eagles 1 # AJA = cbind(AJA,c(1,1)) GAE = cbind(GAE,c(1,1)) ## Gameweek 29 ## # Sparta Rotterdam 1 - Heracles 2 # SPR = cbind(SPR,c(1,2)) HEA = cbind(HEA,c(2,1)) # PSV 5 - AZ Alkmaar 1 # PSV = cbind(PSV,c(5,1)) AZA = cbind(AZA,c(1,5)) # PEC Zwolle 2 - Excelsior 1 # PEC = cbind(PEC,c(2,1)) EXC = cbind(EXC,c(1,2)) # Twente 2 - Fortuna Sittard 0 # TWE = cbind(TWE,c(2,0)) FST = cbind(FST,c(0,2)) # Vitesse 0 - NEC 3 # VIT = cbind(VIT,c(0,3)) NEC = cbind(NEC,c(3,0)) # Feyenoord 6 - Ajax 0 # FEY = cbind(FEY,c(6,0)) AJA = cbind(AJA,c(0,6)) # Go Ahead Eagles 1 - Almere 1 # GAE = cbind(GAE,c(1,1)) ALC = cbind(ALC,c(1,1)) # FC Volendam 3 - RKC Waalwijk 2 # VLN = cbind(VLN,c(3,2)) WAA = cbind(WAA,c(2,3)) # Heerenveen 2 - Utrecht 3 # HEE = cbind(HEE,c(2,3)) UTR = cbind(UTR,c(3,2)) ## Gameweek 30 ## # Excelsior 4 - FC Volendam 0 # EXC = cbind(EXC,c(4,0)) VLN = cbind(VLN,c(0,4)) # PSV 6 - Vitesse 0 # PSV = cbind(PSV,c(6,0)) VIT = cbind(VIT,c(0,6)) # AZ Alkmaar 3 - RKC Waalwijk 2 # AZA = cbind(AZA,c(3,2)) WAA = cbind(WAA,c(2,3)) # Almere 2 - Sparta Rotterdam 3 # ALC = cbind(ALC,c(2,3)) SPR = cbind(SPR,c(3,2)) # Heracles 0 - Heerenveen 2 # HEA = cbind(HEA,c(0,2)) HEE = cbind(HEE,c(2,0)) # Utrecht 2 - Go Ahead Eagles 1 # UTR = cbind(UTR,c(2,1)) GAE = cbind(GAE,c(1,2)) # Fortuna Sittard 0 - Feyenoord 1 # FST = cbind(FST,c(0,1)) FEY = cbind(FEY,c(1,0)) # Ajax 2 - Twente 1 # AJA = cbind(AJA,c(2,1)) TWE = cbind(TWE,c(1,2)) # NEC 2 - PEC Zwolle 2 # NEC = cbind(NEC,c(2,2)) PEC = cbind(PEC,c(2,2)) ## Gameweek 31 ## # Twente 3 - Almere 1 # TWE = cbind(TWE,c(3,1)) ALC = cbind(ALC,c(1,3)) # Ajax 2 - Excelsior 2 # AJA = cbind(AJA,c(2,2)) EXC = cbind(EXC,c(2,2)) # Heerenveen 0 - PSV 8 # HEE = cbind(HEE,c(0,8)) PSV = cbind(PSV,c(8,0)) # Go Ahead Eagles 1 - Feyenoord 3 # GAE = cbind(GAE,c(1,3)) FEY = cbind(FEY,c(3,1)) # NEC 0 - AZ Alkmaar 3 # NEC = cbind(NEC,c(0,3)) AZA = cbind(AZA,c(3,0)) # PEC Zwolle 3 - Heracles 1 # PEC = cbind(PEC,c(3,1)) HEA = cbind(HEA,c(1,3)) # Sparta Rotterdam 1 - FC Volendam 0 # SPR = cbind(SPR,c(1,0)) VLN = cbind(VLN,c(0,1)) # RKC Waalwijk 2 - Utrecht 2 # WAA = cbind(WAA,c(2,2)) UTR = cbind(UTR,c(2,2)) # Vitesse 3 - Fortuna Sittard 2 # VIT = cbind(VIT,c(3,2)) FST = cbind(FST,c(2,3)) ## Gameweek 32 ## # Almere 1 - Heerenveen 1 # ALC = cbind(ALC,c(1,1)) HEE = cbind(HEE,c(1,1)) # Fortuna Sittard 0 - Go Ahead Eagles 0 # FST = cbind(FST,c(0,0)) GAE = cbind(GAE,c(0,0)) # PSV 4 - Sparta Rotterdam 2 # PSV = cbind(PSV,c(4,2)) SPR = cbind(SPR,c(2,4)) # Heracles 0 - RKC Waalwijk 5 # HEA = cbind(HEA,c(0,5)) WAA = cbind(WAA,c(5,0)) # Utrecht 1 - Vitesse 0 # UTR = cbind(UTR,c(1,0)) VIT = cbind(VIT,c(0,1)) # FC Volendam 1 - Ajax 4 # VLN = cbind(VLN,c(1,4)) AJA = cbind(AJA,c(4,1)) # AZ Alkmaar 2 - Twente 1 # AZA = cbind(AZA,c(2,1)) TWE = cbind(TWE,c(1,2)) # Feyenoord 5 - PEC Zwolle 0 # FEY = cbind(FEY,c(5,0)) PEC = cbind(PEC,c(0,5)) # Excelsior 0 - NEC 3 # EXC = cbind(EXC,c(0,3)) NEC = cbind(NEC,c(3,0)) ## Gameweek 33 ## # Excelsior 4 - Heracles 0 # EXC = cbind(EXC,c(4,0)) HEA = cbind(HEA,c(0,4)) # RKC Waalwijk 1 - PEC Zwolle 1 # WAA = cbind(WAA,c(1,1)) PEC = cbind(PEC,c(1,1)) # Ajax 3 - Almere 0 # AJA = cbind(AJA,c(3,0)) ALC = cbind(ALC,c(0,3)) # NEC 2 - Feyenoord 3 # NEC = cbind(NEC,c(2,3)) FEY = cbind(FEY,c(3,2)) # Twente 7 - FC Volendam 2 # TWE = cbind(TWE,c(7,2)) VLN = cbind(VLN,c(2,7)) # Go Ahead Eagles 0 - AZ Alkmaar 3 # GAE = cbind(GAE,c(0,3)) AZA = cbind(AZA,c(3,0)) # Utrecht 0 - Sparta Rotterdam 1 # UTR = cbind(UTR,c(0,1)) SPR = cbind(SPR,c(1,0)) # Heerenveen 1 - Vitesse 3 # HEE = cbind(HEE,c(1,3)) VIT = cbind(VIT,c(3,1)) # Fortuna Sittard 1 - PSV 1 # FST = cbind(FST,c(1,1)) PSV = cbind(PSV,c(1,1)) ## Gameweek 34 ## # Vitesse 2 - Ajax 2 # VIT = cbind(VIT,c(2,2)) AJA = cbind(AJA,c(2,2)) # Almere 1 - NEC 4 # ALC = cbind(ALC,c(1,4)) NEC = cbind(NEC,c(4,1)) # Sparta Rotterdam 2 - Heerenveen 1 # SPR = cbind(SPR,c(2,1)) HEE = cbind(HEE,c(1,2)) # Heracles 0 - Fortuna Sittard 0 # HEA = cbind(HEA,c(0,0)) FST = cbind(FST,c(0,0)) # PEC Zwolle 1 - Twente 2 # PEC = cbind(PEC,c(1,2)) TWE = cbind(TWE,c(2,1)) # FC Volendam 1 - Go Ahead Eagles 2 # VLN = cbind(VLN,c(1,2)) GAE = cbind(GAE,c(2,1)) # Feyenoord 4 - Excelsior 0 # FEY = cbind(FEY,c(4,0)) EXC = cbind(EXC,c(0,4)) # AZ Alkmaar 3 - Utrecht 3 # AZA = cbind(AZA,c(3,3)) UTR = cbind(UTR,c(3,3)) # PSV 3 - RKC Waalwijk 1 # PSV = cbind(PSV,c(3,1)) WAA = cbind(WAA,c(1,3)) ### 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 ## # VIT 18-point penalty (licence issues) table$Pts[which(table$Team=="VIT")] = table$Pts[which(table$Team=="VIT")] - 18 table <- table[order(-table$Pts,-table$GD,-table$GF,table$Team),] row.names(table) <- 1:nrow(table) table