[ESS] ESS + Stata 10 + Windows XP

A.J. Rossini blindglobe at gmail.com
Wed Dec 12 10:41:17 CET 2007


Looks good, thanks for the input.

We (ESS core) have often hoped for a Stata expert/user/interested
party to try to make the connection better.   2 people have
contributed small bits, but there is starting to be a good candidate
for bit-rot in the code (I've not used Stata in a "daily manner" since
around 1998 or so, and no longer have access to the product in my
current job).



On 12/12/07, Walke, Rainer <Walke at demogr.mpg.de> wrote:
> 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.
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>


-- 
best,
-tony

blindglobe at gmail.com
Muttenz, Switzerland.
"Commit early,commit often, and commit in a repository from which we
can easily roll-back your mistakes" (AJR, 4Jan05).

Drink Coffee:  Do stupid things faster with more energy!




More information about the ESS-help mailing list