rp.block | R Documentation |
This function prevents the R console from accepting further input waits until a panel is closed. The function has two uses. The first is to keep R active when an R script is run in batch mode. This prevents the R session from terminating until the panel has been closed. The second use is to block the user from further use of the command prompt. There may be circumstances in which it is helpful to do this.
rp.block(panel)
panel |
the panel whose closure will lead to termination of rp.block. |
rp.block
should usually be the very last function executed in a script, to prevent
termination until the panel has been closed.
Nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk package (http://www.stats.gla.ac.uk/~adrian/rpanel/)
rp.control
## Not run: # This function will be called on pressing the button "Simulate". boxp.sim <- function(panel) { boxplot(rnorm(50)) panel } # Create an rpanel and add the button "Simulate" to it. panel <- rp.control() rp.button(panel, action = boxp.sim, title = "Simulate") rp.block(panel) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.