Re: [R] repeat { readline() }

From: justin bem <justin_bem_at_yahoo.fr>
Date: Mon 09 Jan 2006 - 21:29:23 EST

> Hi.
>
> Using Rterm v2.2.1 on WinXP, is there a way to
> interrupt a call like
>
> repeat { readline() }
>
> without killing the Command window? Ctrl+C is not
> interrupting the loop:

To interupt the loop add and condition for a break like this :
if () break

>
> R : Copyright 2006, The R Foundation for Statistical
> Computing
> Version 2.2.1 Patched (2006-01-01 r36947)
> <snip></snip>
>
> > repeat { readline() }
> ^C
> ^C
> ^C
> ^C
>
> On Unix it works. The problem seems to get the
> interrupt signal to
> "occur" outside the readline() call so that "repeat"
> is interrupted. Doing
>
> repeat { readline(); Sys.sleep(3) }
>
> and it is likely that can generate an interrupt
> signal outside readline().
>
> It seem like readline()/readLines(n=1) or an
> underlying method catches
> the interrupt signal quietly and just waits for a
> symbol to come
> through. Try readline() by itself and press Ctrl+C.
> Maybe this is a
> property of the Windows Command terminal, I don't
> know, but is it a
> wanted feature and are R core aware of it? Note
> that, in Rgui it is
> possible to interrupting such a loop by pressing
> ESC.
>
> Cheers
>
> Henrik
>
> ______________________________________________
> 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
>



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 Mon Jan 09 21:42:49 2006

This archive was generated by hypermail 2.1.8 : Tue 10 Jan 2006 - 02:13:25 EST