Interactively Step Through the Construction of a Stem-and-Leaf Plot
ShinyStemBuild.RdLaunches a Shiny app that steps through the process of building a
stem-and-leaf plot, 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: the data are first rounded, then the stems are drawn, then leaves are added one at a time (then in batches). The final steps sort the data within each stem and show the sorted, rounded data so you can see that the stem-and-leaf plot can be used to recover the (rounded) data.
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 <- ShinyStemBuild()
# h$stop() # run this when finished with the app
}