Re: [R] Running tcltk From a batch file

2007-09-19 Thread Peter Dalgaard
Jonne Zutt wrote: > Hi Samuel, > > An easy solution is the following. Let the R script wait until a certain > variable (ok_to_quit) got changed. > > Hope it helps, > Jonne. > > ## in a file called test.R > quit <- function() { > .Tcl("set ok_to_quit 1") > tkdestroy(tt) > } > > require(tcltk) >

Re: [R] Running tcltk From a batch file

2007-09-19 Thread Jonne Zutt
Hi Samuel, An easy solution is the following. Let the R script wait until a certain variable (ok_to_quit) got changed. Hope it helps, Jonne. ## in a file called test.R quit <- function() { .Tcl("set ok_to_quit 1") tkdestroy(tt) } require(tcltk) tt <<- tktoplevel() OK.but <- tkbutton(tt,text

[R] Running tcltk From a batch file

2007-09-19 Thread Samuel Kemp
Hi, I am trying to run some simple tktcl code ## in a file called test.R require(tcltk) tt <- tktoplevel() OK.but <- tkbutton(tt,text="OK",command=function()tkdestroy(tt)) tkgrid(OK.but) tkfocus(tt) Using a batch file with the command Rterm < test.R > testOutput.Rout --slave The GUI pops u