# 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)
# }
Run the code above in your browser using DataLab