So I have this dataset which I have been cleaning for someone else but they want a specific column made into several columns by type of observation. For example this is a column of diagnoses and she wants this column to be expanded so it is one column for one diagnosis, and another for a different diagnosis. Thus I column with Depression, ADHD, Asthma, Cancer etc would be expanded to one column called depression, one called ADHD etc etc.
I'm pretty sure this violates the principles of tidy data, but the person I am doing this for is adamant this is the way they want it done. So I have tried looking at the tidyr and dplyr packages but so far I am having no luck and could use some advice.
Thanks for your help in advance
Order Diagnosis
1 1 Synaesthesia
2 1 Synaesthesia
3 1 Synaesthesia
4 1 Synaesthesia
5 1 Synaesthesia
6 1 Synaesthesia
7 1 ADHD
8 1 ADHD
9 1 ADHD
10 1 ADHD
11 1 ADHD
12 1 ADHD
13 1 ADHD
14 1 ADHD
15 1 ADHD
16 1 ADHD
17 1 ADHD
18 1 ADHD
19 1 ADHD
20 1 ADHD
21 1 ADHD
22 1 ADHD
23 1 ADHD
24 1 ADHD
25 1 ADHD
26 1 ADHD
27 1 ADHD
28 1 ADHD
29 1 ADHD
30 1 ADHD
31 1 ADHD
32 1 ADHD
33 1 ADHD
34 1 ADHD
35 1 ADHD
36 1 ADHD
37 1 ADHD