[R-gui] Editor in R

John Fox jfox at mcmaster.ca
Tue Apr 6 19:56:48 CEST 2004


Dear Peter and Søren,

The Rcmdr package, which is based on the tcltk package, incorporates a
simple script editor that permits execution of a line or selected
region of code. Simple editing operations (copy, paste, etc.) are
supported, but there are limitations, such as the inability to extend
individual commands over several lines. 

This simple editor serves the purpose of the Rcmdr package, so I
haven't been motivated to improve it, but perhaps it could provide the
basis for something better.

Regards,
 John

On 06 Apr 2004 18:06:33 +0200
 Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:
> 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
> 
> _______________________________________________
> R-SIG-GUI mailing list
> R-SIG-GUI at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-gui


--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/



More information about the R-SIG-GUI mailing list