R: I have data set that contains information of ticket: section, row, seat from, seat to, n.tickets. I want to create seat number using seat from and seat to variable, which will add more rows to my data. Example
data: event , section , row, seat from , seat to, price, n.tickets
1, A, 10, 6, 8, 120, 3
mydata: event , section , row, seat number price, n.tickets
1, A, 10, 6, 120, 3
1, A, 10, 7, 120, 3
1, A, 10, 8, 120, 3
Mydata is the one that I would like to create. I tired rbind command in R but failed. I don't know if I need loops. Any help is much appreciated!