rpanel (version 1.1-4)

rp.control.put: Updates the panel environment with the current value of the panel list object.

Description

Sometimes an action function makes changes to the panel list object. When the action function is completed, the panel environment is updated. However, if there are other calls to action functions within the original action function, then the panel environment needs to be updated before these calls. This function achieves that.

Usage

rp.control.put(panelname, panel)

Arguments

panelname

the panelname of the relevant panel. This is usually identified as panel$panelname.

panel

the relevant panel.

References

rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.

See Also

rp.control

Examples

Run this code
# NOT RUN {
  action1 <- function(panel) {
    panel$x <- rnorm(1)
    rp.control.put(panel$panelname, panel)
    rp.do(panel, action2)
    panel
  }
  action2 <- function(panel) {
  	print(panel$x)
  	panel
  }
  panel <- rp.control(x = 0)
  rp.button(panel, action1, "new x")
# }

Run the code above in your browser using DataCamp Workspace