Interactively Step Through the Construction of a Histogram
ShinyHistogramBuild.RdLaunches a Shiny app that steps through the process of building a
histogram, one point (or batch of points) at a time, using the
precip dataset of average annual precipitation for U.S.
cities.
Details
This function requires the shiny package to be installed. The app has a single numeric input, “Step”, that controls how much of the construction is shown. Early steps lay out the data and the histogram axes/bins; later steps add the data points to the histogram one at a time (then in small batches), illustrating how a histogram is built up from raw data.
The idea is to run the function (without specifying the argument), then use the increment button in the "Step" input box to step through the process.
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 <- ShinyHistogramBuild()
# h$stop() # run this when finished with the app
}