[R-gui] Editor in R

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Apr 6 18:06:33 CEST 2004


Søren Højsgaard <Soren.Hojsgaard at agrsci.dk> writes:

> If I knew how to make such a simple editor within R (as an add-on
> package) then I would do it - but this goes way beyond my
> capabilities. I would therefore like to encourage anyone in the GUI
> group with such technical skills to make such an editor. It would be
> appreciated by many R-beginners...

One problem with this is that you all too easily find yourself
reinventing emacs...

However, the shortest route would seem to be using the tcltk
interface. There is already a rudimentary scripting widget, which you
should be able to extend quite easily. See

http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/evalRcode.html

(this is actually from my own R News paper (2002) but James is doing
such a great job of keeping these examples working...)

As it stands, this widget only allows you to send the entire contents
of the widget, but a "Run selection" item should be well within your
abilities to add. A scrollbar would be nice too (you can scroll text
without it, but people tend to be unable to find out how). And adding
keyboard shortcuts, and, and, ....

Also, you might consider source(textConnection(tkget(... )),
echo=TRUE) instead of the current parse+eval code.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-SIG-GUI mailing list