Re: [R] User input when running R code in batch mode

2009-10-27 Thread Martin Maechler
> Barry Rowlingson > on Tue, 27 Oct 2009 10:17:24 +0100 writes: > On Tue, Oct 27, 2009 at 9:20 AM, Kaushik Krishnan > wrote: >> $ r --vanilla < test.r >>> a <- scan(what='character',n=1); a >> 1: Read 0 items >> character(0) >> >> Now it's not wo

Re: [R] User input when running R code in batch mode

2009-10-27 Thread Bernd Kreuss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kaushik Krishnan wrote: > Is there any way to make R stop for the user to enter values when > running in batch mode either by changing the way I invoke scan() or > readLines() or by using any other function? At least on linux this works: be...@t40:~/

Re: [R] User input when running R code in batch mode

2009-10-27 Thread Barry Rowlingson
On Tue, Oct 27, 2009 at 9:20 AM, Kaushik Krishnan wrote: > $ r --vanilla < test.r >> a <- scan(what='character',n=1); a > 1: Read 0 items > character(0) > > Now it's not working. Assuming this is a unix environment, the syntax '< test.r' means 'my standard input stream is the file test.r'.