### 1. Create table ### col_head = c("Team","GP","W","D","L","GF","GA","GD","Pts") # Column headings teams = c("ABH","ALA","ETT","FAT","FAY","AHZ","ALH","ITT","KHA", "ANA","OKH","RAE","RIY","SHB","ALT","TSP","AWF","DAM") # 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 ## # Al-Ahli Saudi 3 - Al Hazm 1 # ALA = matrix(c(3,1),nrow=2) AHZ = matrix(c(1,3),nrow=2) # Al-Tai 1 - Damac 0 # TSP = matrix(c(1,0),nrow=2) DAM = matrix(c(0,1),nrow=2) # Al-Feiha 3 - Al-Khaleej 1 # FAY = matrix(c(3,1),nrow=2) KHA = matrix(c(1,3),nrow=2) # Al Fateh 1 - Al-Taawoun 1 # FAT = matrix(c(1,1),nrow=2) ALT = matrix(c(1,1),nrow=2) # Al-Riyadh 1 - Al-Wehda 0 # RIY = matrix(c(1,0),nrow=2) AWF = matrix(c(0,1),nrow=2) # Al-Raed 0 - Al-Ittihad 3 # RAE = matrix(c(0,3),nrow=2) ITT = matrix(c(3,0),nrow=2) # Abha 1 - Al-Hilal 3 # ABH = matrix(c(1,3),nrow=2) ALH = matrix(c(3,1),nrow=2) # Al-Ettifaq 2 - Al-Nassr 1 # ETT = matrix(c(2,1),nrow=2) ANA = matrix(c(1,2),nrow=2) # Al-Shabab 1 - Al-Akhdoud 1 # SHB = matrix(c(1,1),nrow=2) OKH = matrix(c(1,1),nrow=2) ## Gameweek 2 ## # Damac 2 - Al-Riyadh 2 # DAM = cbind(DAM,c(2,2)) RIY = cbind(RIY,c(2,2)) # Al-Khaleej 1 - Al-Ahli Saudi 3 # KHA = cbind(KHA,c(1,3)) ALA = cbind(ALA,c(3,1)) # Al-Akhdoud 1 - Al Fateh 3 # OKH = cbind(OKH,c(1,3)) FAT = cbind(FAT,c(3,1)) # Al-Wehda 3 - Al-Shabab 1 # AWF = cbind(AWF,c(3,1)) SHB = cbind(SHB,c(1,3)) # Al-Hazm 0 - Al-Ettifaq 2 # AHZ = cbind(AHZ,c(0,2)) ETT = cbind(ETT,c(2,0)) # Al-Nassr 0 - Al-Taawoun 2 # ANA = cbind(ANA,c(0,2)) ALT = cbind(ALT,c(2,0)) # Abha 1 - Al-Raed 0 # ABH = cbind(ABH,c(1,0)) RAE = cbind(RAE,c(0,1)) # Al-Hilal 1 - Al-Feiha 1 # ALH = cbind(ALH,c(1,1)) FAY = cbind(FAY,c(1,1)) # Al-Ittihad 2 - Al-Tai 0 # ITT = cbind(ITT,c(2,0)) TSP = cbind(TSP,c(0,2)) ## Gameweek 3 ## # Al-Tai 0 - Al-Wehda 3 # TSP = cbind(TSP,c(0,3)) AWF = cbind(AWF,c(3,0)) # Al-Ettifaq 1 - Al-Khaleej 1 # ETT = cbind(ETT,c(1,1)) KHA = cbind(KHA,c(1,1)) # Al-Ahli Saudi 1 - Al Akhdoud 0 # ALA = cbind(ALA,c(1,0)) OKH = cbind(OKH,c(0,1)) # Al-Raed 0 - Al-Hilal 4 # RAE = cbind(RAE,c(0,4)) ALH = cbind(ALH,c(4,0)) # Al-Riyadh 0 - Al-Ittihad 4 # RIY = cbind(RIY,c(0,4)) ITT = cbind(ITT,c(4,0)) # Al-Feiha 0 - Al-Hazm 0 # FAY = cbind(FAY,c(0,0)) AHZ = cbind(AHZ,c(0,0)) # Al-Shabab 1 - Damac 1 # SHB = cbind(SHB,c(1,1)) DAM = cbind(DAM,c(1,1)) # Al-Fateh 0 - Al-Nassr 5 # FAT = cbind(FAT,c(0,5)) ANA = cbind(ANA,c(5,0)) # Al-Taawoun 1 - Abha 0 # ALT = cbind(ALT,c(1,0)) ABH = cbind(ABH,c(0,1)) ## Gameweek 4 ## # Abha 2 - Al Feiha 1 # ABH = cbind(ABH,c(2,1)) FAY = cbind(FAY,c(1,2)) # Al-Hilal 2 - Al-Ettifaq 0 # ALH = cbind(ALH,c(2,0)) ETT = cbind(ETT,c(0,2)) # Al-Wehda 0 - Al-Ittihad 3 # AWF = cbind(AWF,c(0,3)) ITT = cbind(ITT,c(3,0)) # Al-Raed 3 - Al-Riyadh 0 # RAE = cbind(RAE,c(3,0)) RIY = cbind(RIY,c(0,3)) # Al-Akhdoud 0 - Al-Taawoun 1 # OKH = cbind(OKH,c(0,1)) ALT = cbind(ALT,c(1,0)) # Damac 2 - Al Fateh 2 # DAM = cbind(DAM,c(2,2)) FAT = cbind(FAT,c(2,2)) # Al-Nassr 4 - Al-Shabab 0 # ANA = cbind(ANA,c(4,0)) SHB = cbind(SHB,c(0,4)) # Al-Khaleej 1 - Al-Hazm 1 # KHA = cbind(KHA,c(1,1)) AHZ = cbind(AHZ,c(1,1)) # Al-Ahli Saudi 2 - Al-Tai 0 # ALA = cbind(ALA,c(2,0)) TSP = cbind(TSP,c(0,2)) ## Gameweek 5 ## # Al-Tai 1 - Abha 0 # TSP = cbind(TSP,c(1,0)) ABH = cbind(ABH,c(0,1)) # Al Feiha 0 - Al-Raed 0 # FAY = cbind(FAY,c(0,0)) RAE = cbind(RAE,c(0,0)) # Al-Ittihad 3 - Al-Hilal 4 # ITT = cbind(ITT,c(3,4)) ALH = cbind(ALH,c(4,3)) # Al-Riyadh 0 - Al Akhdoud 1 # RIY = cbind(RIY,c(0,1)) OKH = cbind(OKH,c(1,0)) # Al-Ettifaq 3 - Damac 1 # ETT = cbind(ETT,c(3,1)) DAM = cbind(DAM,c(1,3)) # Al-Shabab 1 - Al-Khaleej 3 # SHB = cbind(SHB,c(1,3)) KHA = cbind(KHA,c(3,1)) # Al-Taawoun 4 - Al-Wehda 1 # ALT = cbind(ALT,c(4,1)) AWF = cbind(AWF,c(1,4)) # Al-Hazm 1 - Al-Nassr 5 # AHZ = cbind(AHZ,c(1,5)) ANA = cbind(ANA,c(5,1)) # Al-Fateh 5 - Al-Ahli Saudi 1 # FAT = cbind(FAT,c(5,1)) ALA = cbind(ALA,c(1,5)) ## Gameweek 6 ## # Al-Akhdoud 0 - Al-Ittihad 1 # OKH = cbind(OKH,c(0,1)) ITT = cbind(ITT,c(1,0)) # Al-Wehda 4 - Damac 2 # AWF = cbind(AWF,c(4,2)) DAM = cbind(DAM,c(2,4)) # Al Feiha 0 - Al-Shabab 1 # FAY = cbind(FAY,c(0,1)) SHB = cbind(SHB,c(1,0)) # Al-Hilal 6 - Al-Riyadh 1 # ALH = cbind(ALH,c(6,1)) RIY = cbind(RIY,c(1,6)) # Al-Khaleej 1 - Al Fateh 3 # KHA = cbind(KHA,c(1,3)) FAT = cbind(FAT,c(3,1)) # Abha 1 - Al-Ettifaq 3 # ABH = cbind(ABH,c(1,3)) ETT = cbind(ETT,c(3,1)) # Al-Hazm 1 - Al-Tai 1 # AHZ = cbind(AHZ,c(1,1)) TSP = cbind(TSP,c(1,1)) # Al-Raed 1 - Al-Nassr 3 # RAE = cbind(RAE,c(1,3)) ANA = cbind(ANA,c(3,1)) # Al-Ahli Saudi 3 - Al-Taawoun 2 # ALA = cbind(ALA,c(3,2)) ALT = cbind(ALT,c(2,3)) ## Gameweek 7 ## # Al-Ettifaq 4 - Al-Tai 3 # ETT = cbind(ETT,c(4,3)) TSP = cbind(TSP,c(3,4)) # Al-Taawoun 2 - Al-Raed 1 # ALT = cbind(ALT,c(2,1)) RAE = cbind(RAE,c(1,2)) # Damac 1 - Al-Hilal 1 # DAM = cbind(DAM,c(1,1)) ALH = cbind(ALH,c(1,1)) # Al-Shabab 4 - Al-Hazm 1 # SHB = cbind(SHB,c(4,1)) AHZ = cbind(AHZ,c(1,4)) # Al-Ittihad 2 - Al Fateh 1 # ITT = cbind(ITT,c(2,1)) FAT = cbind(FAT,c(1,2)) # Al-Riyadh 1 - Al Feiha 3 # RIY = cbind(RIY,c(1,3)) FAY = cbind(FAY,c(3,1)) # Al-Akhdoud 0 - Al-Khaleej 1 # OKH = cbind(OKH,c(0,1)) KHA = cbind(KHA,c(1,0)) # Al-Wehda 4 - Abha 0 # AWF = cbind(AWF,c(4,0)) ABH = cbind(ABH,c(0,4)) # Al-Nassr 4 - Al-Ahli Saudi 3 # ANA = cbind(ANA,c(4,3)) ALA = cbind(ALA,c(3,4)) ## Gameweek 8 ## # Al-Hazm 1 - Al-Taawoun 3 # AHZ = cbind(AHZ,c(1,3)) ALT = cbind(ALT,c(3,1)) # Al-Tai 1 - Al-Nassr 2 # TSP = cbind(TSP,c(1,2)) ANA = cbind(ANA,c(2,1)) # Al Feiha 0 - Al-Ittihad 0 # FAY = cbind(FAY,c(0,0)) ITT = cbind(ITT,c(0,0)) # Al-Hilal 2 - Al-Shabab 0 # ALH = cbind(ALH,c(2,0)) SHB = cbind(SHB,c(0,2)) # Abha 0 - Al-Riyadh 1 # ABH = cbind(ABH,c(0,1)) RIY = cbind(RIY,c(1,0)) # Al-Raed 1 - Al-Akhdoud 2 # RAE = cbind(RAE,c(1,2)) OKH = cbind(OKH,c(2,1)) # Al Fateh 5 - Al-Wehda 1 # FAT = cbind(FAT,c(5,1)) AWF = cbind(AWF,c(1,5)) # Al-Ahli Saudi 0 - Al-Ettifaq 0 # ALA = cbind(ALA,c(0,0)) ETT = cbind(ETT,c(0,0)) # Al-Khaleej 0 - Damac 2 # KHA = cbind(KHA,c(0,2)) DAM = cbind(DAM,c(2,0)) ## Gameweek 9 ## # Damac 4 - Al-Hazm 1 # DAM = cbind(DAM,c(4,1)) AHZ = cbind(AHZ,c(1,4)) # Al-Riyadh 2 - Al-Shabab 2 # RIY = cbind(RIY,c(2,2)) SHB = cbind(SHB,c(2,2)) # Al-Taawoun 3 - Al-Tai 0 # ALT = cbind(ALT,c(3,0)) TSP = cbind(TSP,c(0,3)) # Al-Ettifaq 1 - Al Fateh 2 # ETT = cbind(ETT,c(1,2)) FAT = cbind(FAT,c(2,1)) # Al-Nassr 2 - Abha 2 # ANA = cbind(ANA,c(2,2)) ABH = cbind(ABH,c(2,2)) # Al-Ittihad 0 - Al-Ahli Saudi 1 # ITT = cbind(ITT,c(0,1)) ALA = cbind(ALA,c(1,0)) # Al Akhdoud 0 - Al-Hilal 3 # OKH = cbind(OKH,c(0,3)) ALH = cbind(ALH,c(3,0)) # Al-Khaleej 0 - Al-Raed 0 # KHA = cbind(KHA,c(0,0)) RAE = cbind(RAE,c(0,0)) # Al-Wehda 1 - Al Feiha 1 # AWF = cbind(AWF,c(1,1)) FAY = cbind(FAY,c(1,1)) ## Gameweek 10 ## # Al-Akhdoud 1 - Al Feiha 2 # OKH = cbind(OKH,c(1,2)) FAY = cbind(FAY,c(2,1)) # Al-Taawoun 1 - Al-Ittihad 1 # ALT = cbind(ALT,c(1,1)) ITT = cbind(ITT,c(1,1)) # Al Fateh 4 - Abha 1 # FAT = cbind(FAT,c(4,1)) ABH = cbind(ABH,c(1,4)) # Al-Hilal 1 - Al-Khaleej 0 # ALH = cbind(ALH,c(1,0)) KHA = cbind(KHA,c(0,1)) # Al-Nassr 2 - Damac 1 # ANA = cbind(ANA,c(2,1)) DAM = cbind(DAM,c(1,2)) # Al-Hazm 4 - Al-Raed 3 # AHZ = cbind(AHZ,c(4,3)) RAE = cbind(RAE,c(3,4)) # Al-Shabab 2 - Al-Tai 0 # SHB = cbind(SHB,c(2,0)) TSP = cbind(TSP,c(0,2)) # Al-Ahli Saudi 3 - Al-Wehda 1 # ALA = cbind(ALA,c(3,1)) AWF = cbind(AWF,c(1,3)) # Al-Riyadh 1 - Al-Ettifaq 0 # RIY = cbind(RIY,c(1,0)) ETT = cbind(ETT,c(0,1)) ## Gameweek 11 ## # Al-Khaleej 1 - Al-Taawoun 1 # KHA = cbind(KHA,c(1,1)) ALT = cbind(ALT,c(1,1)) # Damac 2 - Al-Akhdoud 0 # DAM = cbind(DAM,c(2,0)) OKH = cbind(OKH,c(0,2)) # Al-Ittihad 2 - Al-Hazm 2 # ITT = cbind(ITT,c(2,2)) AHZ = cbind(AHZ,c(2,2)) # Al-Raed 1 - Al Fateh 2 # RAE = cbind(RAE,c(1,2)) FAT = cbind(FAT,c(2,1)) # Al-Tai 3 - Al-Riyadh 2 # TSP = cbind(TSP,c(3,2)) RIY = cbind(RIY,c(2,3)) # Al-Hilal 3 - Al-Ahli Saudi 1 # ALH = cbind(ALH,c(3,1)) ALA = cbind(ALA,c(1,3)) # Abha 2 - Al-Shabab 1 # ABH = cbind(ABH,c(2,1)) SHB = cbind(SHB,c(1,2)) # Al Feiha 1 - Al-Nassr 3 # FAY = cbind(FAY,c(1,3)) ANA = cbind(ANA,c(3,1)) # Al-Wehda 2 - Al-Ettifaq 3 # AWF = cbind(AWF,c(2,3)) ETT = cbind(ETT,c(3,2)) ## Gameweek 12 ## # Al Fateh 0 - Al-Hilal 2 # FAT = cbind(FAT,c(0,2)) ALH = cbind(ALH,c(2,0)) # Al-Tai 3 - Al Feiha 3 # TSP = cbind(TSP,c(3,3)) FAY = cbind(FAY,c(3,3)) # Al-Shabab 1 - Al-Ittihad 0 # SHB = cbind(SHB,c(1,0)) ITT = cbind(ITT,c(0,1)) # Abha 3 - Al Akhdoud 2 # ABH = cbind(ABH,c(3,2)) OKH = cbind(OKH,c(2,3)) # Al-Ettifaq 0 - Al-Raed 0 # ETT = cbind(ETT,c(0,0)) RAE = cbind(RAE,c(0,0)) # Al-Nassr 2 - Al-Khaleej 0 # ANA = cbind(ANA,c(2,0)) KHA = cbind(KHA,c(0,2)) # Al-Hazm 1 - Al-Wehda 2 # AHZ = cbind(AHZ,c(1,2)) AWF = cbind(AWF,c(2,1)) # Al-Taawoun 0 - Damac 0 # ALT = cbind(ALT,c(0,0)) DAM = cbind(DAM,c(0,0)) # Al-Ahli Saudi 3 - Al-Riyadh 0 # ALA = cbind(ALA,c(3,0)) RIY = cbind(RIY,c(0,3)) ## Gameweek 13 ## # Al-Raed 2 - Al-Shabab 1 # RAE = cbind(RAE,c(2,1)) SHB = cbind(SHB,c(1,2)) # Al-Khaleej 3 - Al-Tai 1 # KHA = cbind(KHA,c(3,1)) TSP = cbind(TSP,c(1,3)) # Damac 2 - Al-Ahli Saudi 2 # DAM = cbind(DAM,c(2,2)) ALA = cbind(ALA,c(2,2)) # Al-Riyadh 1 - Al Fateh 1 # RIY = cbind(RIY,c(1,1)) FAT = cbind(FAT,c(1,1)) # Al-Hilal 2 - Al-Taawoun 0 # ALH = cbind(ALH,c(2,0)) ALT = cbind(ALT,c(0,2)) # Al-Ittihad 4 - Abha 2 # ITT = cbind(ITT,c(4,2)) ABH = cbind(ABH,c(2,4)) # Al Akhdoud 2 - Al-Hazm 1 # OKH = cbind(OKH,c(2,1)) AHZ = cbind(AHZ,c(1,2)) # Al Feiha 0 - Al-Ettifaq 0 # FAY = cbind(FAY,c(0,0)) ETT = cbind(ETT,c(0,0)) # Al-Wehda 1 - Al-Nassr 3 # AWF = cbind(AWF,c(1,3)) ANA = cbind(ANA,c(3,1)) ## Gameweek 14 ## # Al-Taawoun 1 - Al-Riyadh 2 # ALT = cbind(ALT,c(1,2)) RIY = cbind(RIY,c(2,1)) # Al-Ettifaq 1 - Al-Ittihad 1 # ETT = cbind(ETT,c(1,1)) ITT = cbind(ITT,c(1,1)) # Al-Nassr 3 - Al-Akhdoud 0 # ANA = cbind(ANA,c(3,0)) OKH = cbind(OKH,c(0,3)) # Al-Tai 4 - Al-Raed 3 # TSP = cbind(TSP,c(4,3)) RAE = cbind(RAE,c(3,4)) # Al-Hazm 0 - Al-Hilal 9 # AHZ = cbind(AHZ,c(0,9)) ALH = cbind(ALH,c(9,0)) # Damac 4 - Abha 2 # DAM = cbind(DAM,c(4,2)) ABH = cbind(ABH,c(2,4)) # Al-Wehda 3 - Al-Khaleej 1 # AWF = cbind(AWF,c(3,1)) KHA = cbind(KHA,c(1,3)) # Al-Ahli Saudi 0 - Al-Shabab 0 # ALA = cbind(ALA,c(0,0)) SHB = cbind(SHB,c(0,0)) # Al-Fateh 0 - Al Feiha 1 # FAT = cbind(FAT,c(0,1)) FAY = cbind(FAY,c(1,0)) ## Gameweek 15 ## # Al-Riyadh 0 - Al-Hazm 0 # RIY = cbind(RIY,c(0,0)) AHZ = cbind(AHZ,c(0,0)) # Abha 0 - Al-Ahli Saudi 6 # ABH = cbind(ABH,c(0,6)) ALA = cbind(ALA,c(6,0)) # Al-Ittihad 4 - Al-Khaleej 2 # ITT = cbind(ITT,c(4,2)) KHA = cbind(KHA,c(2,4)) # Al-Feiha 2 - Damac 4 # FAY = cbind(FAY,c(2,4)) DAM = cbind(DAM,c(4,2)) # Al-Hilal 3 - Al-Nassr 0 # ALH = cbind(ALH,c(3,0)) ANA = cbind(ANA,c(0,3)) # Al Fateh 0 - Al-Tai 1 # FAT = cbind(FAT,c(0,1)) TSP = cbind(TSP,c(1,0)) # Al-Akhdoud 1 - Al-Ettifaq 0 # OKH = cbind(OKH,c(1,0)) ETT = cbind(ETT,c(0,1)) # Al-Raed 2 - Al-Wehda 0 # RAE = cbind(RAE,c(2,0)) AWF = cbind(AWF,c(0,2)) # Al-Shabab 1 - Al-Taawoun 2 # SHB = cbind(SHB,c(1,2)) ALT = cbind(ALT,c(2,1)) ## Gameweek 16 ## # Damac 3 - Al-Ittihad 1 # DAM = cbind(DAM,c(3,1)) ITT = cbind(ITT,c(1,3)) # Al-Hazm 2 - Al Fateh 0 # AHZ = cbind(AHZ,c(2,0)) FAT = cbind(FAT,c(0,2)) # Al-Shabab 0 - Al-Ettifaq 0 # SHB = cbind(SHB,c(0,0)) ETT = cbind(ETT,c(0,0)) # Al-Tai 1 - Al-Hilal 2 # TSP = cbind(TSP,c(1,2)) ALH = cbind(ALH,c(2,1)) # Al-Taawoun 4 - Al Feiha 1 # ALT = cbind(ALT,c(4,1)) FAY = cbind(FAY,c(1,4)) # Al-Khaleej 3 - Abha 1 # KHA = cbind(KHA,c(3,1)) ABH = cbind(ABH,c(1,3)) # Al-Nassr 4 - Al-Riyadh 1 # ANA = cbind(ANA,c(4,1)) RIY = cbind(RIY,c(1,4)) # Al-Ahli Saudi 0 - Al-Raed 0 # ALA = cbind(ALA,c(0,0)) RAE = cbind(RAE,c(0,0)) # Al-Wehda 2 - Al-Akhdoud 0 # AWF = cbind(AWF,c(2,0)) OKH = cbind(OKH,c(0,2)) ## Gameweek 17 ## # Al Akhdoud 1 - Al-Tai 0 # OKH = cbind(OKH,c(1,0)) TSP = cbind(TSP,c(0,1)) # Abha 1 - Al-Hazm 1 # ABH = cbind(ABH,c(1,1)) AHZ = cbind(AHZ,c(1,1)) # Al Feiha 0 - Al-Ahli Saudi 4 # FAY = cbind(FAY,c(0,4)) ALA = cbind(ALA,c(4,0)) # Al Fateh 1 - Al-Shabab 1 # FAT = cbind(FAT,c(1,1)) SHB = cbind(SHB,c(1,1)) # Al-Hilal 2 - Al-Wehda 0 # ALH = cbind(ALH,c(2,0)) AWF = cbind(AWF,c(0,2)) # Al-Raed 0 - Damac 1 # RAE = cbind(RAE,c(0,1)) DAM = cbind(DAM,c(1,0)) # Al-Riyadh 0 - Al-Khaleej 1 # RIY = cbind(RIY,c(0,1)) KHA = cbind(KHA,c(1,0)) # Al-Ettifaq 0 - Al-Taawoun 2 # ETT = cbind(ETT,c(0,2)) ALT = cbind(ALT,c(2,0)) ## Gameweek 18 ## # Damac 3 - Al-Tai 0 # DAM = cbind(DAM,c(3,0)) TSP = cbind(TSP,c(0,3)) # Al-Khaleej 3 - Al Feiha 0 # KHA = cbind(KHA,c(3,0)) FAY = cbind(FAY,c(0,3)) # Al-Hilal 7 - Abha 0 # ALH = cbind(ALH,c(7,0)) ABH = cbind(ABH,c(0,7)) # Al-Hazm 0 - Al-Ahli Saudi 4 # AHZ = cbind(AHZ,c(0,4)) ALA = cbind(ALA,c(4,0)) # Al-Nassr 3 - Al-Ettifaq 1 # ANA = cbind(ANA,c(3,1)) ETT = cbind(ETT,c(1,3)) # Al-Akhdoud 1 - Al-Shabab 0 # OKH = cbind(OKH,c(1,0)) SHB = cbind(SHB,c(0,1)) # Al-Taawoun 1 - Al Fateh 3 # ALT = cbind(ALT,c(1,3)) FAT = cbind(FAT,c(3,1)) # Al-Ittihad 1 - Al-Raed 3 # ITT = cbind(ITT,c(1,3)) RAE = cbind(RAE,c(3,1)) # Al-Wehda 3 - Al-Riyadh 1 # AWF = cbind(AWF,c(3,1)) RIY = cbind(RIY,c(1,3)) # Al-Ittihad 2 - Al-Nassr 5 # ITT = cbind(ITT,c(2,5)) ANA = cbind(ANA,c(5,2)) ## Gameweek 19 ## # Al-Ettifaq 1 - Al-Hazm 1 # ETT = cbind(ETT,c(1,1)) AHZ = cbind(AHZ,c(1,1)) # Al-Riyadh 1 - Damac 0 # RIY = cbind(RIY,c(1,0)) DAM = cbind(DAM,c(0,1)) # Al-Feiha 0 - Al-Hilal 2 # FAY = cbind(FAY,c(0,2)) ALH = cbind(ALH,c(2,0)) # Al-Raed 4 - Abha 3 # RAE = cbind(RAE,c(4,3)) ABH = cbind(ABH,c(3,4)) # Al-Ahli Saudi 1 - Al-Khaleej 0 # ALA = cbind(ALA,c(1,0)) KHA = cbind(KHA,c(0,1)) # Al Fateh 0 - Al Akhdoud 0 # FAT = cbind(FAT,c(0,0)) OKH = cbind(OKH,c(0,0)) # Al-Taawoun 1 - Al-Nassr 4 # ALT = cbind(ALT,c(1,4)) ANA = cbind(ANA,c(4,1)) # Al-Shabab 1 - Al-Wehda 0 # SHB = cbind(SHB,c(1,0)) AWF = cbind(AWF,c(0,1)) # Al-Tai 0 - Al-Ittihad 3 # TSP = cbind(TSP,c(0,3)) ITT = cbind(ITT,c(3,0)) ## Gameweek 20 ## # Abha 1 - Al-Taawoun 1 # ABH = cbind(ABH,c(1,1)) ALT = cbind(ALT,c(1,1)) # Al-Khaleej 0 - Al-Ettifaq 2 # KHA = cbind(KHA,c(0,2)) ETT = cbind(ETT,c(2,0)) # Damac 0 - Al-Shabab 1 # DAM = cbind(DAM,c(0,1)) SHB = cbind(SHB,c(1,0)) # Al Akhdoud 3 - Al-Ahli Saudi 2 # OKH = cbind(OKH,c(3,2)) ALA = cbind(ALA,c(2,3)) # Al-Wehda 1 - Al-Tai 1 # AWF = cbind(AWF,c(1,1)) TSP = cbind(TSP,c(1,1)) # Al-Hazm 1 - Al Feiha 3 # AHZ = cbind(AHZ,c(1,3)) FAY = cbind(FAY,c(3,1)) # Al-Nassr 2 - Al Fateh 1 # ANA = cbind(ANA,c(2,1)) FAT = cbind(FAT,c(1,2)) # Al-Hilal 3 - Al-Raed 1 # ALH = cbind(ALH,c(3,1)) RAE = cbind(RAE,c(1,3)) # Al-Ittihad 2 - Al-Riyadh 0 # ITT = cbind(ITT,c(2,0)) RIY = cbind(RIY,c(0,2)) ## Gameweek 21 ## # Al-Riyadh 1 - Al-Raed 1 # RIY = cbind(RIY,c(1,1)) RAE = cbind(RAE,c(1,1)) # Al-Taawoun 3 - Al Akhdoud 1 # ALT = cbind(ALT,c(3,1)) OKH = cbind(OKH,c(1,3)) # Al Fateh 1 - Damac 1 # FAT = cbind(FAT,c(1,1)) DAM = cbind(DAM,c(1,1)) # Al-Tai 1 - Al-Ahli Saudi 4 # TSP = cbind(TSP,c(1,4)) ALA = cbind(ALA,c(4,1)) # Al-Hazm 1 - Al-Khaleej 1 # AHZ = cbind(AHZ,c(1,1)) KHA = cbind(KHA,c(1,1)) # Al Feiha 3 - Abha 2 # FAY = cbind(FAY,c(3,2)) ABH = cbind(ABH,c(2,3)) # Al-Shabab 2 - Al-Nassr 3 # SHB = cbind(SHB,c(2,3)) ANA = cbind(ANA,c(3,2)) # Al-Ettifaq 0 - Al-Hilal 2 # ETT = cbind(ETT,c(0,2)) ALH = cbind(ALH,c(2,0)) # Al-Ittihad 2 - Al-Wehda 1 # ITT = cbind(ITT,c(2,1)) AWF = cbind(AWF,c(1,2)) ## Gameweek 22 ## # Al-Wehda 3 - Al-Taawoun 3 # AWF = cbind(AWF,c(3,3)) ALT = cbind(ALT,c(3,3)) # Al-Raed 1 - Al Feiha 2 # RAE = cbind(RAE,c(1,2)) FAY = cbind(FAY,c(2,1)) # Al-Nassr 4 - Al-Hazm 4 # ANA = cbind(ANA,c(4,4)) AHZ = cbind(AHZ,c(4,4)) # Abha 2 - Al-Tai 0 # ABH = cbind(ABH,c(2,0)) TSP = cbind(TSP,c(0,2)) # Al-Akhdoud 1 - Al-Riyadh 2 # OKH = cbind(OKH,c(1,2)) RIY = cbind(RIY,c(2,1)) # Al-Hilal 3 - Al-Ittihad 1 # ALH = cbind(ALH,c(3,1)) ITT = cbind(ITT,c(1,3)) # Al-Khaleej 0 - Al-Shabab 0 # KHA = cbind(KHA,c(0,0)) SHB = cbind(SHB,c(0,0)) # Damac 0 - Al-Ettifaq 2 # DAM = cbind(DAM,c(0,2)) ETT = cbind(ETT,c(2,0)) # Al-Ahli Saudi 1 - Al Fateh 1 # ALA = cbind(ALA,c(1,1)) FAT = cbind(FAT,c(1,1)) ## Gameweek 23 ## # Al-Shabab 2 - Al Feiha 3 # SHB = cbind(SHB,c(2,3)) FAY = cbind(FAY,c(3,2)) # Damac 1 - Al-Wehda 0 # DAM = cbind(DAM,c(1,0)) AWF = cbind(AWF,c(0,1)) # Al-Nassr 1 - Al-Raed 3 # ANA = cbind(ANA,c(1,3)) RAE = cbind(RAE,c(3,1)) # Al-Tai 1 - Al-Hazm 0 # TSP = cbind(TSP,c(1,0)) AHZ = cbind(AHZ,c(0,1)) # Al-Riyadh 1 - Al-Hilal 3 # RIY = cbind(RIY,c(1,3)) ALH = cbind(ALH,c(3,1)) # Al-Ittihad 2 - Al Akhdoud 1 # ITT = cbind(ITT,c(2,1)) OKH = cbind(OKH,c(1,2)) # Al Fateh 1 - Al-Khaleej 2 # FAT = cbind(FAT,c(1,2)) KHA = cbind(KHA,c(2,1)) # Al-Ettifaq 3 - Abha 0 # ETT = cbind(ETT,c(3,0)) ABH = cbind(ABH,c(0,3)) # Al-Taawoun 0 - Al-Ahli Saudi 1 # ALT = cbind(ALT,c(0,1)) ALA = cbind(ALA,c(1,0)) ## Gameweek 24 ## # Abha 1 - Al-Wehda 0 # ABH = cbind(ABH,c(1,0)) AWF = cbind(AWF,c(0,1)) # Al-Hazm 0 - Al-Shabab 3 # AHZ = cbind(AHZ,c(0,3)) SHB = cbind(SHB,c(3,0)) # Al-Khaleej 2 - Al Akhdoud 2 # KHA = cbind(KHA,c(2,2)) OKH = cbind(OKH,c(2,2)) # Al-Ahli Saudi 0 - Al-Nassr 1 # ALA = cbind(ALA,c(0,1)) ANA = cbind(ANA,c(1,0)) # Al-Tai 1 - Al-Ettifaq 1 # TSP = cbind(TSP,c(1,1)) ETT = cbind(ETT,c(1,1)) # Al Feiha 1 - Al-Riyadh 1 # FAY = cbind(FAY,c(1,1)) RIY = cbind(RIY,c(1,1)) # Al-Hilal 2 - Damac 1 # ALH = cbind(ALH,c(2,1)) DAM = cbind(DAM,c(1,2)) # Al Fateh 2 - Al-Ittihad 4 # FAT = cbind(FAT,c(2,4)) ITT = cbind(ITT,c(4,2)) # Al-Raed 0 - Al-Taawoun 0 # RAE = cbind(RAE,c(0,0)) ALT = cbind(ALT,c(0,0)) ## Gameweek 25 ## # Al-Taawoun 4 - Al-Hazm 0 # ALT = cbind(ALT,c(4,0)) AHZ = cbind(AHZ,c(0,4)) # Damac 0 - Al-Khaleej 1 # DAM = cbind(DAM,c(0,1)) KHA = cbind(KHA,c(1,0)) # Al-Akhdoud 1 - Al-Raed 3 # OKH = cbind(OKH,c(1,3)) RAE = cbind(RAE,c(3,1)) # Al-Ettifaq 2 - Al-Ahli Saudi 2 # ETT = cbind(ETT,c(2,2)) ALA = cbind(ALA,c(2,2)) # Al-Ittihad 3 - Al Feiha 1 # ITT = cbind(ITT,c(3,1)) FAY = cbind(FAY,c(1,3)) # Al-Shabab 3 - Al-Hilal 4 # SHB = cbind(SHB,c(3,4)) ALH = cbind(ALH,c(4,3)) # Al-Wehda 2 - Al Fateh 3 # AWF = cbind(AWF,c(2,3)) FAT = cbind(FAT,c(3,2)) # Al-Riyadh 1 - Abha 1 # RIY = cbind(RIY,c(1,1)) ABH = cbind(ABH,c(1,1)) # Al-Nassr 5 - Al-Tai 1 # ANA = cbind(ANA,c(5,1)) TSP = cbind(TSP,c(1,5)) ## Gameweek 26 ## # Al-Hazm 0 - Damac 0 # AHZ = cbind(AHZ,c(0,0)) DAM = cbind(DAM,c(0,0)) # Al-Raed 0 - Al-Khaleej 1 # RAE = cbind(RAE,c(0,1)) KHA = cbind(KHA,c(1,0)) # Al-Ahli Saudi 1 - Al-Ittihad 0 # ALA = cbind(ALA,c(1,0)) ITT = cbind(ITT,c(0,1)) # Al-Hilal 3 - Al Akhdoud 0 # ALH = cbind(ALH,c(3,0)) OKH = cbind(OKH,c(0,3)) # Al Feiha 1 - Al-Wehda 2 # FAY = cbind(FAY,c(1,2)) AWF = cbind(AWF,c(2,1)) # Abha 0 - Al-Nassr 8 # ABH = cbind(ABH,c(0,8)) ANA = cbind(ANA,c(8,0)) # Al-Tai 2 - Al-Taawoun 3 # TSP = cbind(TSP,c(2,3)) ALT = cbind(ALT,c(3,2)) # Al-Shabab 1 - Al-Riyadh 0 # SHB = cbind(SHB,c(1,0)) RIY = cbind(RIY,c(0,1)) # Al Fateh 1 - Al-Ettifaq 0 # FAT = cbind(FAT,c(1,0)) ETT = cbind(ETT,c(0,1)) ## Gameweek 27 ## # Damac 0 - Al-Nassr 1 # DAM = cbind(DAM,c(0,1)) ANA = cbind(ANA,c(1,0)) # Al-Khaleej 1 - Al-Hilal 4 # KHA = cbind(KHA,c(1,4)) ALH = cbind(ALH,c(4,1)) # Al-Ittihad 0 - Al-Taawoun 0 # ITT = cbind(ITT,c(0,0)) ALT = cbind(ALT,c(0,0)) # Al-Wehda 1 - Al-Ahli Saudi 1 # AWF = cbind(AWF,c(1,1)) ALA = cbind(ALA,c(1,1)) # Al-Tai 0 - Al-Shabab 0 # TSP = cbind(TSP,c(0,0)) SHB = cbind(SHB,c(0,0)) # Al-Ettifaq 1 - Al-Riyadh 0 # ETT = cbind(ETT,c(1,0)) RIY = cbind(RIY,c(0,1)) # Al-Raed 2 - Al-Hazm 0 # RAE = cbind(RAE,c(2,0)) AHZ = cbind(AHZ,c(0,2)) # Abha 2 - Al Fateh 1 # ABH = cbind(ABH,c(2,1)) FAT = cbind(FAT,c(1,2)) # Al Feiha 3 - Al Akhdoud 0 # FAY = cbind(FAY,c(3,0)) OKH = cbind(OKH,c(0,3)) ## Gameweek 28 ## # Al-Taawoun 1 - Al-Khaleej 1 # ALT = cbind(ALT,c(1,1)) KHA = cbind(KHA,c(1,1)) # Al-Shabab 5 - Abha 0 # SHB = cbind(SHB,c(5,0)) ABH = cbind(ABH,c(0,5)) # Al Fateh 3 - Al-Raed 1 # FAT = cbind(FAT,c(3,1)) RAE = cbind(RAE,c(1,3)) # Al-Riyadh 1 - Al-Tai 2 # RIY = cbind(RIY,c(1,2)) TSP = cbind(TSP,c(2,1)) # Al-Nassr 3 - Al Feiha 1 # ANA = cbind(ANA,c(3,1)) FAY = cbind(FAY,c(1,3)) # Al Akhdoud 1 - Damac 2 # OKH = cbind(OKH,c(1,2)) DAM = cbind(DAM,c(2,1)) # Al-Hazm 2 - Al-Ittihad 3 # AHZ = cbind(AHZ,c(2,3)) ITT = cbind(ITT,c(3,2)) # Al-Ettifaq 0 - Al-Wehda 0 # ETT = cbind(ETT,c(0,0)) AWF = cbind(AWF,c(0,0)) ## Gameweek 29 ## # Al Feiha 1 - Al Tai 0 # FAY = cbind(FAY,c(1,0)) TSP = cbind(TSP,c(0,1)) # Al-Wehda 0 - Al-Hazm 2 # AWF = cbind(AWF,c(0,2)) AHZ = cbind(AHZ,c(2,0)) # Al-Riyadh 2 - Al-Ahli Saudi 1 # RIY = cbind(RIY,c(2,1)) ALA = cbind(ALA,c(1,2)) # Damac 0 - Al-Taawoun 1 # DAM = cbind(DAM,c(0,1)) ALT = cbind(ALT,c(1,0)) # Al-Hilal 3 - Al Fateh 1 # ALH = cbind(ALH,c(3,1)) FAT = cbind(FAT,c(1,3)) # Al-Ittihad 1 - Al-Shabab 3 # ITT = cbind(ITT,c(1,3)) SHB = cbind(SHB,c(3,1)) # Al Akhdoud 4 - Abha 0 # OKH = cbind(OKH,c(4,0)) ABH = cbind(ABH,c(0,4)) # Al-Raed 2 - Al-Ettifaq 2 # RAE = cbind(RAE,c(2,2)) ETT = cbind(ETT,c(2,2)) # Al-Khaleej 0 - Al-Nassr 1 # KHA = cbind(KHA,c(0,1)) ANA = cbind(ANA,c(1,0)) ## Gameweek 30 ## # Al-Hazm 0 - Al Akhdoud 0 # AHZ = cbind(AHZ,c(0,0)) OKH = cbind(OKH,c(0,0)) # Al Fateh 2 - Al-Riyadh 2 # FAT = cbind(FAT,c(2,2)) RIY = cbind(RIY,c(2,2)) # Al-Ahli Saudi 4 - Damac 1 # ALA = cbind(ALA,c(4,1)) DAM = cbind(DAM,c(1,4)) # Al-Taawoun 0 - Al-Hilal 3 # ALT = cbind(ALT,c(0,3)) ALH = cbind(ALH,c(3,0)) # Abha 3 - Al-Ittihad 1 # ABH = cbind(ABH,c(3,1)) ITT = cbind(ITT,c(1,3)) # Al-Ettifaq 1 - Al Feiha 2 # ETT = cbind(ETT,c(1,2)) FAY = cbind(FAY,c(2,1)) # Al-Shabab 2 - Al-Raed 0 # SHB = cbind(SHB,c(2,0)) RAE = cbind(RAE,c(0,2)) # Al-Tai 0 - Al-Khaleej 0 # TSP = cbind(TSP,c(0,0)) KHA = cbind(KHA,c(0,0)) # Al-Nassr 6 - Al-Wehda 0 # ANA = cbind(ANA,c(6,0)) AWF = cbind(AWF,c(0,6)) # Al-Ahli Saudi 1 - Al-Hilal 2 # ALA = cbind(ALA,c(1,2)) ALH = cbind(ALH,c(2,1)) ## Gameweek 31 ## # Al Feiha 2 - Al Fateh 2 # FAY = cbind(FAY,c(2,2)) FAT = cbind(FAT,c(2,2)) # Al-Riyadh 0 - Al-Taawoun 0 # RIY = cbind(RIY,c(0,0)) ALT = cbind(ALT,c(0,0)) # Al Akhdoud 2 - Al-Nassr 3 # OKH = cbind(OKH,c(2,3)) ANA = cbind(ANA,c(3,2)) # Abha 0 - Damac 0 # ABH = cbind(ABH,c(0,0)) DAM = cbind(DAM,c(0,0)) # Al-Khaleej 1 - Al-Wehda 2 # KHA = cbind(KHA,c(1,2)) AWF = cbind(AWF,c(2,1)) # Al-Ittihad 0 - Al-Ettifaq 5 # ITT = cbind(ITT,c(0,5)) ETT = cbind(ETT,c(5,0)) # Al-Hilal 4 - Al-Hazm 1 # ALH = cbind(ALH,c(4,1)) AHZ = cbind(AHZ,c(1,4)) # Al-Raed 1 - Al-Tai 1 # RAE = cbind(RAE,c(1,1)) TSP = cbind(TSP,c(1,1)) # Al-Shabab 1 - Al-Ahli Saudi 2 # SHB = cbind(SHB,c(1,2)) ALA = cbind(ALA,c(2,1)) ## Gameweek 32 ## # Al-Tai 3 - Al Fateh 1 # TSP = cbind(TSP,c(3,1)) FAT = cbind(FAT,c(1,3)) # Al-Wehda 0 - Al-Raed 1 # AWF = cbind(AWF,c(0,1)) RAE = cbind(RAE,c(1,0)) # Al-Khaleej 1 - Al-Ittihad 1 # KHA = cbind(KHA,c(1,1)) ITT = cbind(ITT,c(1,1)) # Damac 1 - Al Feiha 1 # DAM = cbind(DAM,c(1,1)) FAY = cbind(FAY,c(1,1)) # Al-Ettifaq 1 - Al Akhdoud 1 # ETT = cbind(ETT,c(1,1)) OKH = cbind(OKH,c(1,1)) # Al-Nassr 1 - Al-Hilal 1 # ANA = cbind(ANA,c(1,1)) ALH = cbind(ALH,c(1,1)) # Al-Taawoun 1 - Al-Shabab 0 # ALT = cbind(ALT,c(1,0)) SHB = cbind(SHB,c(0,1)) # Al-Hazm 1 - Al-Riyadh 1 # AHZ = cbind(AHZ,c(1,1)) RIY = cbind(RIY,c(1,1)) # Al-Ahli Saudi 5 - Abha 1 # ALA = cbind(ALA,c(5,1)) ABH = cbind(ABH,c(1,5)) ## Gameweek 33 ## # Al-Ittihad 4 - Damac 1 # ITT = cbind(ITT,c(4,1)) DAM = cbind(DAM,c(1,4)) # Al-Raed 0 - Al-Ahli Saudi 0 # RAE = cbind(RAE,c(0,0)) ALA = cbind(ALA,c(0,0)) # Al-Riyadh 2 - Al-Nassr 2 # RIY = cbind(RIY,c(2,2)) ANA = cbind(ANA,c(2,2)) # Al Fateh 2 - Al-Hazm 1 # FAT = cbind(FAT,c(2,1)) AHZ = cbind(AHZ,c(1,2)) # Abha 2 - Al-Khaleej 1 # ABH = cbind(ABH,c(2,1)) KHA = cbind(KHA,c(1,2)) # Al-Hilal 3 - Al-Tai 1 # ALH = cbind(ALH,c(3,1)) TSP = cbind(TSP,c(1,3)) # Al-Ettifaq 1 - Al-Shabab 0 # ETT = cbind(ETT,c(1,0)) SHB = cbind(SHB,c(0,1)) # Al Feiha 1 - Al-Taawoun 1 # FAY = cbind(FAY,c(1,1)) ALT = cbind(ALT,c(1,1)) # Al Akhdoud 1 - Al-Wehda 1 # OKH = cbind(OKH,c(1,1)) AWF = cbind(AWF,c(1,1)) ## Gameweek 34 ## # Al-Shabab 3 - Al Fateh 2 # SHB = cbind(SHB,c(3,2)) FAT = cbind(FAT,c(2,3)) # Al-Wehda 1 - Al-Hilal 2 # AWF = cbind(AWF,c(1,2)) ALH = cbind(ALH,c(2,1)) # Al-Ahli Saudi 1 - Al Feiha 0 # ALA = cbind(ALA,c(1,0)) FAY = cbind(FAY,c(0,1)) # Al-Nassr 4 - Al-Ittihad 2 # ANA = cbind(ANA,c(4,2)) ITT = cbind(ITT,c(2,4)) # Damac 1 - Al-Raed 1 # DAM = cbind(DAM,c(1,1)) RAE = cbind(RAE,c(1,1)) # Al-Taawoun 1 - Al-Ettifaq 0 # ALT = cbind(ALT,c(1,0)) ETT = cbind(ETT,c(0,1)) # Al-Hazm 2 - Abha 1 # AHZ = cbind(AHZ,c(2,1)) ABH = cbind(ABH,c(1,2)) # Al-Tai 0 - Al Akhdoud 2 # TSP = cbind(TSP,c(0,2)) OKH = cbind(OKH,c(2,0)) # Al-Khaleej 1 - Al-Riyadh 2 # KHA = cbind(KHA,c(1,2)) RIY = cbind(RIY,c(2,1)) ### 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] } table <- table[order(-table$Pts,-table$GD,-table$GF,table$Team),] row.names(table) <- 1:nrow(table) table