Hello everybody,
I hope you can give me some ideas about a small data cleaning problem which I can't get fixed even after doing research.
I use STATA 13, and importing data of the Freedom in the World Index, the structure looks like this:

Now I would like to combine row 1 and 2 to get e.g. "PR_2013".
I tried something like gen newvar = B[_n]+B[_n+1] and tried to use foreach var of varlist
but nothing worked out...
Probably there is a very simple command which joins string values of two cells... would be glad if you have any hint,
thanks
Ida
I hope you can give me some ideas about a small data cleaning problem which I can't get fixed even after doing research.
I use STATA 13, and importing data of the Freedom in the World Index, the structure looks like this:
Now I would like to combine row 1 and 2 to get e.g. "PR_2013".
I tried something like gen newvar = B[_n]+B[_n+1] and tried to use foreach var of varlist
but nothing worked out...
Probably there is a very simple command which joins string values of two cells... would be glad if you have any hint,
thanks
Ida
Comment