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
BATCH and tcltk
4 messages · "Unternährer Thomas, uth", Peter Dalgaard, Thomas W Blackwell +1 more
"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
On Thu, Apr 17, 2003 at 04:20:53PM +0200, Peter Dalgaard BSA wrote:
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?
[...]
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.
The tkttest.R demo works fine in batch mode, so you coukld study that example: ~:> cp /mnt/d/R/rw1062/library/tcltk/demo/tkttest.R . ~:> Rcmd.exe BATCH tkttest.R This is from a Cygwin shell, but that does not matter. Hth, Dirk
Don't drink and derive. Alcohol and algebra don't mix.