Code:
variable e not found r(111);
Code:
des `k' , clear replace
If helpful I can post some -trace- output.
Code:
... * data munging here ... tempfile TF des * list * , sep(0) assert x==0 qui forv z = 1/3 { noi di _newline(1) foreach k in ID x { preserve if `z'==1 sa "my_data", replace /* when `z'==1 I save a copy to disk */ if `z'==2 sa `TF', replace /* when `z'==2 I save a tempfile */ if `z'==3 noi di "on iteration z=3, no saving: " /* when `z'==3 no saving */ noi di "`z'; `k'; `c(filename)'" keep `k' noi des `k' , clear replace restore } }
Here's the output:
Code:
. tempfile TF . des * Variable Storage Display Value name type format label Variable label ----------------------------------------------------------------------------------------------------------------------------------- ID str6 %9s Household ID x float %9.0g daily nexus yarn per AE . list * , sep(0) +------------+ | ID x | |------------| 1. | 100001 0 | 2. | 100002 0 | 3. | 100003 0 | 4. | 100004 0 | 5. | 100005 0 | +------------+ . assert x==0 . qui forv z = 1/3 { 1; ID; my_data.dta 1; x; my_data.dta 2; ID; C:\Users\BHOLTE~1\AppData\Local\Temp\ST_6a70_000001.tmp 2; x; C:\Users\BHOLTE~1\AppData\Local\Temp\ST_6a70_000001.tmp on iteration z=3, no saving: 3; ID; work\my_original_data.dta on iteration z=3, no saving: 3; x; work\my_original_data.dta variable e not found r(111); end of do-file r(111);
0 Response to "variable e not found" message from -describe-
Post a Comment