Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: User input from shell script
From
Roberto Ferrer <[email protected]>
To
Stata Help <[email protected]>
Subject
Re: st: User input from shell script
Date
Thu, 14 Nov 2013 19:33:28 -0430
I'm not sure I understand but can you not have R intermittently
read/parse a -log- file produced by Stata?
On Thu, Nov 14, 2013 at 5:45 PM, Thomas, Anthony
<[email protected]> wrote:
> Hi Statalist,
>
> I am trying to write an ado file (Stata 11 for Linux) that calls an R
> program which requests user input from "stdin" - in this case the
> system command line. So a simplified example would be:
>
> shell Rscript rProgram.r ...
>
> The R program will periodically pause and request input from the user
> before continuing. For those familiar with R, the actual call in the
> program is: readLines(file('stdin'), 1).
>
> However, when the R program is called from Stata, R does not recognize
> the Stata command line as a source of input and skips the steps of
> asking for user input. Is there any way to pipe the output of the
> Stata command line to R, or to the system command line? I hope this
> question makes some sense...
>
> Thanks,
>
> Anthony
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/