Am 31.05.2008 um 09:16 schrieb Daniel Becker:
I'm sure the devil is in the details (eg there are issues with
coordinating the running of Stata and R). For instance, Stata may
have
to go to sleep until R signals that the code execution is over etc.
But the above does not seem any more daunting than the average ado
out
there.
Wouldn't the easy check be: Stata, please white until the file /file/
that/is/the/result/of/executing/R/ exists?
A variant of the pause command? How about an option waitfor(/file/
that/is/the/result/of/executing/R/results.txt) for rsource?
problem solved: google returned http://datasets.org/statalist/archive/2002-06/msg00295.html
capture confirm file c:\wherever\output.txt
while _rc { /* file does not exist! */
sleep 1000 /* wait 1000 ms = 1 second before trying again */
capture confirm file c:\wherever\output.txt
}
Daniel
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/