[R] repeat { readline() }

Luke Tierney luke at stat.uiowa.edu
Mon Jan 9 20:11:47 CET 2006


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 at 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 at stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu




More information about the R-help mailing list