Hi all,
I am attempting to organize my data analysis project using the package -project- by Robert Picard.
In a nested do-file, I calculate the distance of households to the closest mobile money agent via the -geonear- command, which generates a temp file.
Whenever I build the project, I get the error message 'file C:\Users\u1808714\AppData\Local\Temp\ST_1f18_00000 q.tmp already exists'. However, when I manually run the -geonear- command after loading the concerned file into Stata, it works perfectly.
For background information (not sure if this is relevant to my problem): I have a dataset and a nested do-file for each of the survey years 2012, 2009 and 2007, which I later append to create panel data. I run the -genonear- command for the 2012 dataset and 2009 dataset via their respective do-files,
Do-file 2012 contains
Do-file 2009 contains
I do not receive an error message for these commands. Only then the project runs the do-file 2007 and I receive the mentioned error message. So I am a bit puzzled why it works for the first two files and not for the last one. Is it possible that the temp file already exists from earlier attempts to build the project?
Not sure if I explained this well enough, so please feel free to ask questions. Thank you for your help!
Best, Elizabeth
I am attempting to organize my data analysis project using the package -project- by Robert Picard.
In a nested do-file, I calculate the distance of households to the closest mobile money agent via the -geonear- command, which generates a temp file.
Code:
geonear hhid latitude longitude using "`pdir'\data\agents\Agents07.dta", n(agentid agentlat agentlong)
For background information (not sure if this is relevant to my problem): I have a dataset and a nested do-file for each of the survey years 2012, 2009 and 2007, which I later append to create panel data. I run the -genonear- command for the 2012 dataset and 2009 dataset via their respective do-files,
Do-file 2012 contains
Code:
geonear hhid latitude longitude using "`pdir'\data\agents\Agents12.dta", n(agentid agentlat agentlong)
Code:
geonear hhid latitude longitude using "`pdir'\data\agents\Agents09.dta", n(agentid agentlat agentlong)
Not sure if I explained this well enough, so please feel free to ask questions. Thank you for your help!
Best, Elizabeth
Comment