Skip to contents

Launches a Shiny app with 5 tabbed datasets (Old Faithful waiting times, U.S. presidential approval ratings, car gas mileage, exam scores, and a hand-constructed dataset). Each tab provides sliders for the number of bins and the minimum and maximum values used to build the histogram's breakpoints.

Usage

ShinyHistogramExamp()

Details

This function requires the shiny package to be installed. Changing the number of bins, or the starting point (minimum) and ending point (maximum) of the breakpoints, shows how much the appearance of a histogram can change for the same underlying data, which is especially apparent in the “Constructed Dataset” tab.

Value

Launches the app in non-blocking mode (via startApp) and returns a ShinyAppHandle immediately, so the R console remains available while the app runs in the background. Use handle$stop() to stop the app.

Author

Greg Snow 538280@gmail.com

Examples

if(interactive()) {
  h <- ShinyHistogramExamp()
  # h$stop() # run this when finished with the app
}