[R] 'scan' in a script?

Daniel Nordlund djnordlund at verizon.net
Fri Jul 10 07:03:12 CEST 2009


> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Mark Knecht
> Sent: Thursday, July 09, 2009 9:35 PM
> To: jim holtman
> Cc: r-help
> Subject: Re: [R] 'scan' in a script?
> 
> On Thu, Jul 9, 2009 at 6:05 PM, jim holtman<jholtman at gmail.com> wrote:
> > If you want the value printed in the script, then use the 
> 'print' function:
> >
> > print(MyNames)
> >
> > There is an implicit 'print' when you type an object's name at the
> > command line, but with you have it within a script, you have to
> > explicitly print it.
> >
> <SNIP>
> 
> That's good to know in terms of reliably getting the data out but my
> bigger problem right now is it doesn't wait for me to type any input
> and therefore my program (running as a script) doesn't know what to
> do.
> 
> I guess this must be me doing somethign jsut plain wrong. I figured
> I'd ask and get an answer in 30 seconds. Strange I'm that far off. If
> I need to run it in the interpreter instead of source it then for now
> I can do that until I learn what I'm doing wrong.
> 
> I've got more interesting questions of which the answers are far more
> important to me than this one!
> 
> Thanks,
> Mark

Mark,

Take a look at the readline() function.

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA




More information about the R-help mailing list