Нужно преобразовать данные из df1 в df2?
a <- c("New Zealand","Afghanistan","Afghanistan" , "New Zealand", "Afghanistan", "Australia" )
b <- c("Sri Lanka", "Zimbabwe" , "Zimbabwe", "Sri Lanka", "Zimbabwe" , "India" )
d <- c("no result" , "Zimbabwe" , "Zimbabwe" ,"New Zealand", "Afghanistan", "Australia" )
df1 <- data.frame("Team1" = a, "Team2" = b, "Winner" = d)
Country <- c("New Zealand", "Sri Lanka","Afghanistan","Zimbabwe", "Australia","India" )
Match <- c(2,2,3,3,1,1)
Win <- c(1,0,1,2,1,0)
Loss <- c(0,1,2,1,0,1)
Draw <- c(1,1,0,0,0,0)
df2 <- data.frame(Country, Match,Win, Loss, Draw )
Заранее спасибо.