Hi everyone!
I am wondering if I can somehow keep the variable labels when I use the reshape command. My dataset looks currently like this (is in the long format) and I want to reshape it to the wide format using this command: reshape wide b02 b03, i(ID) j(livestock).
The variables b02 and b03 are labeled and I want that after the reshaping command the variable b021, b022,.. have the labels of the variable b02 and the variables b031,b032 have the labels of the variable b03. Does anyone has a great idea on how to do this? Because otherwise it will be super timeconsuming to relabel all those variables again as my dataset has over 1000 variables.
Hope someone can help!
Greetings,
Kathrin
I am wondering if I can somehow keep the variable labels when I use the reshape command. My dataset looks currently like this (is in the long format) and I want to reshape it to the wide format using this command: reshape wide b02 b03, i(ID) j(livestock).
ID | livestock | b02 | b03 |
2 | Cow | 1 | 234 |
2 | Duck | 7 | 234 |
1 | Cow | 4 | 134 |
5 | Chicken | 4 | 984 |
5 | Duck | 4 | 34 |
Hope someone can help!
Greetings,
Kathrin
Comment