Currently my data looks like:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int date byte(chestpress shoulderpress fly) 22182 45 30 25 22188 45 45 25 22191 50 45 20 end format %tddd-Mon date
and I would like to turn it into:
Date | exercise | weight |
09/10/2020 | chestpress | 45 |
09/11/2020 | chestpress | 45 |
09/12/2020 | chestpress | 45 |
09/10/2020 | shoulderpress | 45 |
09/11/2020 | shoulderpress | 45 |
09/12/2020 | shoulderpess | 50 |
09/10/2020 | fly | 40 |
09/11/2020 | fly | 45 |
09/12/2020 | fly | 45 |
reshape long chest_press incline_ch_press fly, i(date) j(weight)
stack chestpress shoulderpess fly, into(exercise) wide
Thanks in advance!
0 Response to Data transformation - not sure exactly which one is needed
Post a Comment