Hi, First of all I would like to explain that , this is not a homework.
I want to do it out of curiosity and for learning purposes.
I have data like this:
This is a result of a test for one candidate. I have results of 100 candidates.
In test we have 60 questions and the answers are from A to E. They are placed on test-card in two columns, from 1-50 and 51-100 and this is why I have "-" (dashes) in my data. This is how testing machine spits out results into a *.txt file. It scans it columnwise I suppose. First four digits are numerical codes for candidate, then because two columns are left empty I have two spaces , then I have group number (1 or 2) and then I have answers to questions from 1-60.
* are here to mark what machine did not recognize properly.
I want to have single candidate's answers to all questions in one row. The desirable results are as follows:
I would be grateful for any help, because it seems difficult to me.
I would provide reprex but I don't know how to do it in this case, so I just inserted first five rows of my data.