

In order to access the input that we gave in the ui section of the app, we need to use input$ with what the input is named, in this case bins.

The second section function(input, output) actually builds the output. The Output function adds space in the UI for an R object which we’ll build in the server function. The term plot determines the type of output that will be displayed (other types of outputs include tableOutput, imageOutput, and textOutput) and “distPlot” is the name given to the output object (you can name this whatever you want). To display the output, the function looks like plotOutput(“distPlot”). The format is a question mark, and then the input type which you are unsure about. If you’re unsure about how any of the functions work, you can type ?sliderInput for any additional information. The next item Number of bins: is the label that is displayed. The first item under sliderInput( ) is bins which is the name of the input. You can change the title, what type of input you want (numericInput( ), selectInput( ), and dateInput( ) are popular as well), and the elements within the input (like the minimum, maximum and preset values). The fluidPage contains both the input and output functions, for example, the titlePanel, sliderInput, and plotOutput. The first section fluidPage() contains the elements in the app.
