I can get dataex to work when all I need to do is get state to make a list of values, but I can't make dataex work when I'm trying to export lines of code.
If I put dataex in the same line as my code, I'm told 'variable not found'.
If I put dataex in a line above my code, I'm told 'input statement exceeds linesize limit. Try specifying fewer variables'. See screenshot below: Array
This is the code I would like to export using dataex:
gen occsoc_noX = subinstr(occsoc, "X", "0", .)What should I do? Have I perhaps misunderstood the function of the command 'dataex'?
destring occsoc_noX, gen (occsoc_num)
drop occsoc_noX
gen occsoc_noblanks = occsoc
replace occsoc_noblanks = strtrim(occsoc_noblanks)
gen occsoc_noX = subinstr(occsoc_noblanks, "X", "0", .)
destring occsoc_noX, gen (occsoc_num)
Thanks for your time and consideration.
Rosa
0 Response to Making "dataex" command work to export lines of code to statalist
Post a Comment