I have a 312x2 matrix representing number of questions answered (column 2) by individual subjects (column 1) e.g.
x =
40 56
41 56
42 176
43 176
44 116
45 56
46 56
47 116
48 56
49 56
50 116
Some participants answered the questionnaire more than once, and I would like to divide their data into additional columns.
I.e. participant 43 completed it 3 times - 56 questions once, 60 questions twice.
Therefore, I'd like to split their data into 3 columns, to end up with:
x =
40 56
41 56
42 56 60 60
43 56 60 60
44 56 60
...etc
I'll then fill in the gaps with NaN so i can work out the mean questions answered per questionnaire.