From phgrosjean at sciviews.org  Fri Jul  6 15:15:20 2007
From: phgrosjean at sciviews.org (Philippe Grosjean)
Date: Fri, 06 Jul 2007 15:15:20 +0200
Subject: [Rd] Hook for running a function before evaluation
Message-ID: <468E4068.8020203@sciviews.org>

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
( ( ( ( (
..............................................................



[Rd] Hook for running a function before evaluation
Philippe Grosjean