Hi,
I am importing some raw data file into Stata and I want to put the first observation into variable names; the problem I have is the variable names are A, B, C etc.
In this case I can't make them in the loops such as :
"
forvalues j = 1/43 {
label variable var`j' `=var`j'[1]'
rename var`j' `=var`j'[1]'
}
"
How can I come over this issue? or are there other ways to put variable names such as A, B, C et.c in a loop like above?
Appreciate your help!
Thanks
I am importing some raw data file into Stata and I want to put the first observation into variable names; the problem I have is the variable names are A, B, C etc.
In this case I can't make them in the loops such as :
"
forvalues j = 1/43 {
label variable var`j' `=var`j'[1]'
rename var`j' `=var`j'[1]'
}
"
How can I come over this issue? or are there other ways to put variable names such as A, B, C et.c in a loop like above?
Appreciate your help!
Thanks
Comment