Eric ESPOSITO wrote:
> Hello,
> I need to execute R code contained in a file xxx.R from DOS.
> The file is really simple, only:
>
>>plot(rnorm(100))
You have to specify the windows() device explicitly, if you are in
non-interactive mode:
windows()
plot(rnorm(100))
> When I launch Rterm from Dos command and then source the file xxx.R it
> works, but I need to call the command from a DOS command file *.bat
> Using Rterm --slave < xxx.R plots the graph in a postscript file
Rplots.ps,
> how can I do to get the graph in an R window.
> Using a command windows() or win.graph() in the R file does not work any
> more.
>
> I have the same problem with tk widgets. If the file xxx.R is:
>
>>library(tcltk)
>>tt<-tktoplevel()
>
> The widget does not appear on the screen.
It appears! I guess your R process has finished right after those lines
and the window has been shut before you have seen it.
Uwe Ligges
> Does anybody can help?
> Regards,
>
> Eric