File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1- function (input , output ) {
1+ # This code was adapted from the Shiny R package examples:
2+ # https://github.com/rstudio/shiny-examples/tree/main/083-front-page
23
3- output $ main_plot <- renderPlot({
44
5+ function (input , output ) {
6+ # Main plot
7+ output $ main_plot <- renderPlot({
8+ # Histogram plot
59 hist(old_faithful $ eruptions ,
610 probability = TRUE ,
711 breaks = as.numeric(input $ n_breaks ),
812 xlab = " Duration (minutes)" ,
913 main = " Geyser eruption duration" )
10-
14+
15+ # Adds individual observations to plot
1116 if (input $ individual_obs ) {
1217 rug(old_faithful $ eruptions )
1318 }
14-
19+
20+ # Adds density estimates to plot
1521 if (input $ density ) {
1622 dens <- density(old_faithful $ eruptions ,
1723 adjust = input $ bw_adjust )
You can’t perform that action at this time.
0 commit comments