[R] tcltk package functionality
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Thu Sep 28 20:38:47 CEST 2000
"Anantha Prasad/NE/USDAFS" <aprasad at fs.fed.us> writes:
> Hello,
> I wrote a function in R which uses tcltk package .... essentially I wanted
> to give within that function, a widget with 2 radiobuttons to choose
> between plotting Precip and Temperature plots. After the user has chosen
> one of the radiobuttons there is another widget that asking him to identify
> outliers. However, I am having a lot of problems...what R does is evaluate
> the whole function without pausing...if I introduce a while() loop as I
> have in the example below, R does nothing until I hit cntrl-c upon which it
> shows the widget and comes out of the function......I could use a while
> loop in S-PLUS using the dialog.create() dialog.display() functions, but I
> cannot seem to implement that functionality in R.....what am I doing wrong?
> I enclose below the sample function...Any help will be greatly
> appreciated....
Did you take a look at the tkttest demo? (esp. the tkwait.variable
bit)
The tcltk event loop runs off of the input handler and is not happy if
R gets caught in a tight loop (this might change later on, and the
Windows port already has some code to avoid this).
--
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
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list