[R] Interrupt R?

Philippe Grosjean phgrosjean at sciviews.org
Mon Jul 12 10:57:33 CEST 2010


Take a look also at ?tclTaskSchedule in package tcltk2.
Best,

Philippe Grosjean

On 12/07/10 08:53, Prof Brian Ripley wrote:
> On Sun, 11 Jul 2010, Spencer Graves wrote:
>
>> Hi, Richard and Duncan:
>>
>>
>> Thank you both very much. You provided different but workable solutions.
>>
>>
>> 1. With Rgui 2.11.1 on Vista x64, the escape worked, but neither
>> ctrl-c nor ctrl-C worked for me.
>
> Why did you expect them too? Ctrl-C is documented to implement 'Copy'
> (the standard Windows shortcut). (Did you mean Ctrl-Shift-C by 'Ctrl-C'
> as distinct from 'Ctrl-c'? I don't think that works anywhere.)
>
> As Duncan said, Ctrl-C works in Rterm, and in almost all other R
> implementations (the Mac R.app GUI is the only other exception I know:
> it also uses Escape).
>
> This is documented in the README (called something like README.R-2.11.1
> in the binary distribution) and in the rw-FAQ Q5.1. Maybe it would be a
> good idea to refresh your memory of the basic documentation?
>
>> 2. The TCLTK version works but seems to require either more skill from
>> the programmer or more user training than using escape under Rgui or
>> ctrl-g/c under Emacs.
>>
>>
>> Best Wishes,
>> Spencer
>>
>>
>> On 7/11/2010 12:02 PM, Duncan Murdoch wrote:
>>> On 11/07/2010 2:29 PM, Spencer Graves wrote:
>>>> How can one interrupt the following gracefully:
>>>>
>>>>
>>>> while(TRUE){
>>>> Sys.sleep(1)
>>>> }
>>>>
>>>>
>>>> In R2.11.1 under Emacs+ESS, some sequence of ctrl-g, ctrl-c
>>>> eventually worked for me. Under Rgui 2.11.1, the only way I've found
>>>> was to kill R.
>>>>
>>>>
>>>> Suggestions on something more graceful?
>>>
>>> This is an Emacs+ESS bug. In the Windows GUI or using Rterm, the
>>> standard methods (ESC or Ctrl-C resp.) work fine.
>>>
>>> Duncan Murdoch
>>>
>>>
>>>>
>>>> Beyond this, what would you suggest to update a real-time report
>>>> when new data arrives in a certain directory? A generalization of
>>>> the above works, but I'd like something more graceful.
>>>>
>>>>
>>>> Thanks,
>>>> Spencer Graves
>>>>
>>>>
>>>> sessionInfo()
>>>> R version 2.11.1 (2010-05-31)
>>>> i386-pc-mingw32
>>>>
>>>> locale:
>>>> [1] LC_COLLATE=English_United States.1252
>>>> [2] LC_CTYPE=English_United States.1252
>>>> [3] LC_MONETARY=English_United States.1252
>>>> [4] LC_NUMERIC=C
>>>> [5] LC_TIME=English_United States.1252
>>>>
>>>> attached base packages:
>>>> [1] stats graphics grDevices utils datasets methods base
>>>>
>>>> other attached packages:
>>>> [1] SIM_0.5-0 RCurl_1.4-2 bitops_1.0-4.1 R2HTML_2.1 oce_0.1-80
>>
>> --
>> Spencer Graves, PE, PhD
>> President and Chief Operating Officer
>> Structure Inspection and Monitoring, Inc.
>> 751 Emerson Ct.
>> San José, CA 95126
>> ph: 408-655-4567
>>
>> ______________________________________________
>> 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.
>>
>
>
>
> ______________________________________________
> 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.



More information about the R-help mailing list