Skip to content
Prev 977 / 1236 Next

[R-gui] Process control in gWidgets

Hi Hana, 

I use the rpanel package to generate GUIs for R. 
Here is an example of what you are trying to do with the rpanel package: 
(p.s. make sure buffered output is switched off in the Rgui). 

  
reallySlowFunction = function(panel,n=20) {
for(i in 1:n) {
cat("z")
Sys.sleep(0.5) 
cat("\n")
}

return(panel)
}


library(rpanel)
# Create an rpanel and add the button "Simulate" to it.
panel <- rp.control()
rp.button(panel, action = reallySlowFunction, title = "Simulate")

Regards, 

Wayne






-----Original Message-----
From: r-sig-gui-bounces at stat.math.ethz.ch
[mailto:r-sig-gui-bounces at stat.math.ethz.ch]On Behalf Of Hana Sevcikova
Sent: 11 August 2009 07:30
To: jverzani
Cc: r-sig-gui at stat.math.ethz.ch
Subject: Re: [R-gui] Process control in gWidgets


Thank you very much, John. I am indeed using gWidgetsRGtk2 but I was 
hoping to make my GUI independent of the specific toolkit. But there is 
probably no easy solution. Even with the gtkEventsPending() and 
gtkMainIteration() I don't get the output into the R-console as the 
computation runs, rather at the very end.

Please let me know if you get other ideas how to solve it.

Thanks,

Hana
jverzani wrote:
_______________________________________________
R-SIG-GUI mailing list
R-SIG-GUI at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-gui