Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73270

Changing variable names with variable labels

$
0
0
Hi all,

I have been researching and trying out some commands.
May I know why is it that these two categories of commands are literally the same but the bottom one has syntax error at the renaming variable part while the first category does not have any problem?

Category 1:
local i=1
la var var1 q`i'
local lab: var la var1
ren var1 `lab'

Category 2:
local i=1
la var var1 q`i'
ren var1 var la var1

Thanks a lot.

Viewing all articles
Browse latest Browse all 73270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>