I am using the home_goal
and away_goal
to make a new variable to see the game result for the game.
This is what I have
if(data$home_team_goal < data$away_team_goal){
data$result <- c('H')
}else if (data$home_team_goal > data$away_team_goal){
data$result<- c('A')
}else (data$home_team_goal == data$away_team_goal){
data$result<- c('D')
}
it giving all the game a draw.