I need to combine multiple records per patient into one long record. The dataset looks like this: patient cohort score_a score_b score_c A 1 2 2 A 2 2 2 B 2 2 1 B 3 1 1 C 1 2 1 C 2 2 C 3 1 Ideally it should look like this: patient Cohort_a cohort_b cohort_c score_a score_b score_c score_d score_e score_f A 1 2 1 2 2 2 2 B 2 3 2 1 0 1 1 C 1 2 3 2 1 1
... View more