Re: [Rd] Hook for running a function before evaluation

From: Philippe Grosjean <phgrosjean_at_sciviews.org>
Date: Fri, 06 Jul 2007 23:31:54 +0200

Hi Byron,

Excellent! I am also on OS X (together with Win XP and Quantian using Parallels desktop ;-)

So far, so good, I have the latest RExecServer running in a terminal. So, what can I do with it?
Best,

Philippe

..............................................<}))><........
  ) ) ) ) )
( ( ( ( ( Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( ( Numerical Ecology of Aquatic Systems   ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( (
..............................................................

Byron Ellis wrote:
> Hi Philippe,
>
> This is exactly the approach being taken in RExecServer (which is in
> turn possibly connected to front ends via distributed objects). It's
> an OS X app so the model is
>
> my_ReadConsole(...) {
> didFinishEvaluationForInterpreter(...);
> internalReadConsole(...); (usually start the run loop and wait for an
> appropriate event)
> willBeginEvaluationForInterpreter(...);
> }
>
> technically there should also be shouldBeginEvaluationforInterpreter()
> to let us bail out of evaluation and head back to the reader loop.
>
> http://repo.or.cz/w/RExecServer.git
>
> On 7/6/07, Philippe Grosjean <phgrosjean_at_sciviews.org> wrote:

>> Hello,
>> I like much addTaskCallback() and friends. However, there are situations
>> were we would like to have a function run BEFORE, not after every
>> top-level tasks. I think specifically to reset options(width = ) to
>> accommodate to the current width of the console, using something like:
>>
>> options(width = system("tput cols"))
>>
>> I am sure there are many other situations where this could be useful.
>> Combining tasks run before and after evaluation, one could design a
>> system to (remotely) indicate when a given R kernel is
>> starting/evaluating/ending evaluation of some code (with Rpad in mind,
>> for instance).
>>
>> How difficult would it be to implement such Tasks run before top-level 
>> ones?
>>
>> Best,
>>
>> Philippe
>> -- 
>> ..............................................<}))><........
>>   ) ) ) ) )
>> ( ( ( ( (    Prof. Philippe Grosjean
>>   ) ) ) ) )
>> ( ( ( ( (    Numerical Ecology of Aquatic Systems
>>   ) ) ) ) )   Mons-Hainaut University, Belgium
>> ( ( ( ( (
>> ..............................................................
>>
>> ______________________________________________
>> R-devel_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>

>

>

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 06 Jul 2007 - 21:40:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 07 Jul 2007 - 01:35:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.