Let's now look at server.R, where it should all become clear. Look at the following code:
function(input, output) { # server is define d here output$textDisplay = renderText({ # assign to output$textDisplay paste0("You said '", input$comment, # from text input "'.There are ", nchar(input$comment), " characters in this.") }) }
We define the reactive components of the application within function(input, output) {...}. On the whole, two types of things go in here. Reactive objects (for example, data) are defined, which are then passed around as needed (for example, to different output instructions), and outputs are defined, such as graphs. This simple example contains only the latter. We'll see an example ...