TR: [R] Scripting capabilities for R

Peter Dalgaard BSA p.dalgaard at
Fri Jun 15 21:40:10 CEST 2001

Paul E Johnson <pauljohn at> writes:

> In concept, it is the same as source ("filename") right after you use
> notepad to edit filename, but more convenient.  I don't want syntax
> highlighting, command completion, or anything like that, just the
> ability to open a file, edit it, run it through R, and save it.  
> I'd be interested in helping to write an addon that does this, expept I
> don't know how it would be done across all platforms.  SOmething with
> the Gnome toolkit would probably be pretty easy, maybe we could get bye
> with just glib and gtk+ and make something that is statically compiled,
> so users don't need to install glib/gdk+ on their Windows systems.  Is
> there R-gnome anymore?  SOmeone is working on this already?  Should I be
> going into the R-devel list with this?

For knocking something up quickly, tcl/tk is an option, e.g.

tt <- tktoplevel()
txt <- tktext(tt)
tkbind(txt,"<F12>", function() {
	cat("Exec. from text window:\n****\n",code,"\n****\n") 

already gives you a text window where you can write and edit commands
and submit them by hitting F12. Loading and saving is left as an
exercise... (as is executing the statements one by one as with
source(...,echo=T) )

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at             FAX: (+45) 35327907
r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at

More information about the R-help mailing list