[R] Interrupt handling

Arne Kovac kovac at stat-math.uni-essen.de
Fri Dec 5 00:31:05 CET 2003


I had noticed that the change was deliberate, otherwise I would have
thought that this was a bug...

Your suggestion to use R_CheckUserInterrupt() might certainly be a
reasonable solution for many users of R. However, I would still prefer to
be able to interrupt my C code by just pressing CTRL-C and not to worry
about putting R_CheckUserInterrupt() commands into several places of my
program when searching long and complicated source code for some bug. And
I also prefer to press CTRL-C when I'm working with some function from
some CRAN package, start to think that my data vector was too large for
that function and want to try out the function on a subset of the data.  
Finally, as you already noted, there are people around who write their
programs in Fortran.

I'm afraid I will stick to the old version 1.7.1 until the advantages of 
the current versions become more compelling :-(

BTW: The unnamed OS was Linux.


> The short answer is `no', nothing has changed since 1.8,0.  There was a 
> change at 1.8.0, and that was deliberate and described in the NEWS file.
> You seem rather confused about this!
> 
> A slighter longer answer is that this depended on your unnamed OS having 
> such interrupts, so for many R users there was no such facility.
> Surely the right thing to do is to make your C code interruptible by 
> inserting calls to R_CheckUserInterrupt() so interrupts occur at planned 
> places and work on all platforms.  (That's a little harder to do with 
> Fortran code, something I plan to address before 1.9.0.)
> 
> On Thu, 4 Dec 2003, Arne Kovac wrote:
> 
> > I recently installed R 1.8.1 on some of our machines and noted quickly
> > that the handling of interrupts has changed since version 1.8.0. Are there
> > any plans to reintroduce the old behaviour as a feature when compiling R
> > or even better as a command line option? The problem is that we are
> > extensively calling C functions from R which take quite a large time to
> > finish. With the new version we had to kill the R process quite often and
> > at the end we sadly decided to reinstall version 1.7.1 on all of our
> > computers.
> > 
> > Sorry about my complaints, apart from this particular problem we are very
> > grateful for all the people developing this fantastic software.
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>




More information about the R-help mailing list