The server.R of the minimal example

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 ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.