Turning one row into multiple rows in r [duplicate]
问题 This question already has answers here : Combine Multiple Columns Into Tidy Data [duplicate] (3 answers) Closed 3 years ago . In R, I have data where each person has multiple session dates, and the scores on some tests, but this is all in one row. I would like to change it so I have multiple rows with the persons info, but only one of the session dates and corresponding test scores, and do this for every person. Also, each person may have completed different number of sessions. Ex: ID Name