I have a data frame that is supposed to show the winners of a tournament and their opponents. Currently the loser is in every other row. So, row 1 is the winner, row 2 is the loser, row 3 is the winner, row 4 is the loser, and so on.
I want the winner and their opponent to be next to each other so that it's easier to see who competed against who. The tricky part is keeping the gym, names, and competitor number for each person together in the same row.
How do I move every other row to a new column so that the winner and their opponent are in the same row?
y = read.csv('https://raw.githubusercontent.com/bandcar/Examples/main/y.csv')
# FAILED ATTEMPT
library(data.table)
z=dcast(setDT(y)[, grp := gl(.N, 2, .N)], grp ~ rowid(grp),
value.var = setdiff(names(y), 'grp'))[, grp := NULL][]
Note that both photos are different data sets
What my df currently looks like:

