Hi R-hackers
I try to write a batch (in Windows, i have to use!) with
Rcmd BATCH D:\Test.R D:\Test.Rout and
Rterm.exe --no-restore --no-save < D:\Test.R > D:\Test.Rout.
In my file Test.R are any tk-codelines (like: Window1 <- tktoplevel(); ...
tkbutton...).
It works not interactifly, what is written in Rcmd BATCH --help.
Exist there a way to do it all the same?
Please help... Otherwise i have to use Excel to get the GUIs .
(and sorry about my english, it's terrible)
Thomas
Content Security by MailMarshal
"Untern?hrer Thomas, uth" <uth at zhwin.ch> writes:> Hi R-hackers > > I try to write a batch (in Windows, i have to use!) with > Rcmd BATCH D:\Test.R D:\Test.Rout and > Rterm.exe --no-restore --no-save < D:\Test.R > D:\Test.Rout. > > In my file Test.R are any tk-codelines (like: Window1 <- tktoplevel(); ... tkbutton...). > It works not interactifly, what is written in Rcmd BATCH --help. > > Exist there a way to do it all the same? > > Please help... Otherwise i have to use Excel to get the GUIs . > > (and sorry about my english, it's terrible)I haven't messed with this on Windows for a while, but it might help to stick a tkwait.variable("foo") or something like that at the end of your input script. The thing is to get Tcl's event loop going - R usually drives it from the keyboard entry loop, but there is none in batch mode. -- 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
Thomas -
Does your batch script include the line library("tcltk") ?
The syntax for a batch script is exactly the sequence of
commands you would type at the R command line, without an
R prompt character at the beginning of each line. It's
often much easier to develop and debug a batch script by
working interactively the first time.
Unfortunately, I do not use Windows, so I do not understand
any details of getting tcl/tk to work properly under Windows.
Could you ask a more specific question.
- tom blackwell - u michigan medical school - ann arbor -
On Thu, 17 Apr 2003, [iso-8859-1] "Unternährer Thomas, uth" wrote:
> Hi R-hackers
>
> I try to write a batch (in Windows, i have to use!) with
> Rcmd BATCH D:\Test.R D:\Test.Rout and
> Rterm.exe --no-restore --no-save < D:\Test.R > D:\Test.Rout.
>
> In my file Test.R are any tk-codelines
> (like: Window1 <- tktoplevel(); ... tkbutton...).
> It works not interactifly, what is written in Rcmd BATCH --help.
>
> Exist there a way to do it all the same?
>
> Please help... Otherwise i have to use Excel to get the GUIs .
>
> (and sorry about my english, it's terrible)
>
> Thomas