I am looking for an easy way to add every other row to a new column in R. I have NCAA basketball teams that are playing each other on separate, consecutive rows. Example below: St. Joes is playing La Salle, and Connecticut is playing Seton Hall, etc. I want each "game" to be on the same line. I have messed around with lead/lag to solve this but that has left me with errors either with the first or last row, depending which one I use. Here is an example of my data:
# current data
Team spread price
St. Joes -3 -105
La Salle 3 -115
Connecticut -1.5 -105
Seton Hall 1.5 -115
Minnesota 5.5 -110
Penn State -5.5 -110
# desired output below
Team1 spread1 price1 Team2 spread2 price2
St. Joes -3 -105 La Salle 3 -115
Connecticut -1.5 -105 Seton Hall 1.5 -115
Minnesota 5.5 -110 Penn State -5.5 -110