Re: [R] Pause the execution of a function

From: Jonathan Daily <biomathjdaily_at_gmail.com>
Date: Wed, 27 Apr 2011 14:09:54 -0400

Try ?scan or ?readLines.

On Wed, Apr 27, 2011 at 11:42 AM, Lisa <lisajca_at_gmail.com> wrote:
> Dear all,
>
> I am trying to write a script to pause the execution of a function and
> provide some additional commands to the function and then continue execution
> of the function. For example, when my function detects a wrong number in a
> dataset, the function pauses automatically and returns information on the
> screen:
>
> “There is a wrong number in the dataset. Would you like to correct it? ”
>
> If I input “yes” from the keyboard and hit the enter key, the function asks
> again:
>
> “What is the correct number?”
>
> After inputting a correct number from the keyboard and hitting the enter
> key, the function continues to execute.
>
> Can anybody please help how to get this done? Thanks a lot in advance
>
> Lisa
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Pause-the-execution-of-a-function-tp3478535p3478535.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
===============================================
Jon Daily
Technician
===============================================
#!/usr/bin/env outside
# It's great, trust me.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 27 Apr 2011 - 18:15:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Apr 2011 - 22:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive