I have been tasked to tidy up some data and am having issues with trying to transform the data from this format:
id occupation_busdriver occupation_cashier occupation_nurse
1 0 0 1
2 0 1 0
3 1 0 0
my actual dataset is significantly larger, but this is the area in which I am struggling, and therefore an example for this set would be much appreciated.
I have already tried using the gather and select functions
I am looking to have the data in this format:
id occupation
1 nurse
2 cashier
3 busdriver