Re: [R] repeat { readline() }

From: Luke Tierney <luke_at_stat.uiowa.edu>
Date: Tue 10 Jan 2006 - 06:11:47 EST

Use tryCatch; try behaves the way it does with respect to interrupts for historical compatibility.

luke

On Sun, 8 Jan 2006, hadley wickham wrote:

> On a related note, does anyone know how to exit:
>
> repeat { try( readline() ) }
>
> The try block captures Ctrl-C.
>
> Hadley
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke@stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jan 10 06:20:23 2006

This archive was generated by hypermail 2.1.8 : Tue 10 Jan 2006 - 14:17:07 EST