GUIs

There are several ways to add interactivity to an Rpad page. From simplest to complex, some possibilities are:

The basic GUI elements that are "named" are translated into variables with the same name in R. Here are some basic elements:

Pepperoni Sausage Extra cheese Mushrooms Peppers Onions

Favorite number

(This button just does the same as F9 or the Calculate menu item.)

Here is a dropdown list generated by R:

HTMLon() # switch to html mode
data(state)
HTMLselect("favoriteAmericanState", state.name) # generate the select box
      

After fiddling with some of the inputs, hit F9 or the calculate button and see that the following outputs change:

cat("isPepperoni =",isPepperoni,"\n")
cat("browserDropdown =",browserDropdown,"\n")
cat("favoriteNumber =",favoriteNumber,"\n")
cat("favoriteAmericanState =",favoriteAmericanState,"\n")
      



by Tom Short, tshort@epri.com, Copyright 2005. EPRI, license: GNU GPL v2 or greater