[ESS] ESS + Stata 10 + Windows XP
Walke, Rainer
Walke at demogr.mpg.de
Wed Dec 12 10:34:09 CET 2007
Thank you for your answers.
It seems to me that there is no ready-to-use solution for ESS and Stata
10 (Windows).
I tried a workaround.
Start an infinite loop in Stata
emacsloop.do:
---------------------------------------------
local myfilename="U:\EmacsHome\statainput.do"
set more off
while 1 {
capture confirm file `"`myfilename'"'
if !_rc {
capture noisily include `"`myfilename'"'
capture erase `"`myfilename'"'
}
sleep 1000
}
---------------------------------------------
Thanks to Roland's hint, I extended my .emacs file by
---------------------------------------------
(defun stata-submit (beg end)
"writes the marked region (specified interactively by the marks
'beg' and 'end') to the file specified as 'myfilename'.
If 'myfilename' exists, file gets overwritten."
(interactive "r")
(setf myfilename "U:\\EmacsHome\\statainput.do")
(write-region beg end myfilename))
(global-set-key [f7] 'stata-submit)
---------------------------------------------
It works. Clearly, I do not get the results back to Emacs.
I think for firm solution Stata automation could provide some tools:
http://www.stata.com/automation
Kind regards,
Rainer
----------
This mail has been sent through the MPI for Demographic Research. Should you receive a mail that is apparently from a MPI user without this text displayed, then the address has most likely been faked. If you are uncertain about the validity of this message, please check the mail header or ask your system administrator for assistance.
More information about the ESS-help
mailing list