In trying to get a grip on the newly released Shiny library for R I simply rewrote the example from the tutorial to work with ggplot. The code is taken from the Shiny Tutorial. I did not make any changes to ui.R provided in the tutorial. The rewritten server.R is below.