Dear all,
I have a dataset with variables that differ only in the first letter of the variable name, e.g.
datum_7 xdatum_7 wdatum_7 zdatum_7 ydatum_7
rheum_7 wrheum_7 zrheum_7
For re-organizing my data I would like to identify those variables that could be "grouped together", i.e. are identical, except for the first letter. For example, I would like to list the "groups" first, then put any "group" in a macro and do some recoding, renaming etc. The main problem here is that I have 2000+ variables in the dataset and I am looking for a handy way to identify the groups without searching for them manually. I tried different commands like renvars, findnames, order or rename - but was not successful so far.
Anone an idea?
Thanks,
Alex
I have a dataset with variables that differ only in the first letter of the variable name, e.g.
datum_7 xdatum_7 wdatum_7 zdatum_7 ydatum_7
rheum_7 wrheum_7 zrheum_7
For re-organizing my data I would like to identify those variables that could be "grouped together", i.e. are identical, except for the first letter. For example, I would like to list the "groups" first, then put any "group" in a macro and do some recoding, renaming etc. The main problem here is that I have 2000+ variables in the dataset and I am looking for a handy way to identify the groups without searching for them manually. I tried different commands like renvars, findnames, order or rename - but was not successful so far.
Anone an idea?
Thanks,
Alex
Comment