Hi All,
Suppose you have repeated variables at different assessments: A1SMOKE A2SMOKE A3SMOKE A4SMOKE. And you want to reshape these into long format. How can I loop it to rename them SMOKE1 SMOKE2 SMOKE3 SMOKE4 or SMOKEA1 SMOKEA2 SMOKEA3 SMOKEA4. I have to do this for many variables but have not seen a loop that will assist. Cheers.
Suppose you have repeated variables at different assessments: A1SMOKE A2SMOKE A3SMOKE A4SMOKE. And you want to reshape these into long format. How can I loop it to rename them SMOKE1 SMOKE2 SMOKE3 SMOKE4 or SMOKEA1 SMOKEA2 SMOKEA3 SMOKEA4. I have to do this for many variables but have not seen a loop that will assist. Cheers.
Comment