Search code examples
rrgui

Hook into Rgui console?


Is it possible to change the behaviour of R console such that, for instance

  • before each command execution a fortune() is printed, or
  • similar to browser(), the prompt is altered, and some new commands (c,n,Q) are introduced?

I am looking for an alternative to readline() that keeps the history function (key up) intact.

I am using R on winxp with Rgui, but a portable solution would be great.


Solution

  • Yes, though it is independent of the GUI as just uses the callback mechanism as for example in the quesion on R: Display a time clock in the R command line.