greetingApp <- function() {
# define a user-interface with two elements: a text input with an ID,
# label, and initial value; define a textOutput that
# returns the input + greeting
ui <- fluidPage(
textInput(inputId = "nameInput",
label = "What is your name?",
value = "World"),
textOutput("name")
)
# define the server side logic to manipulate the inputs
server <- function(input, output, session) {
# define the output that concatenates the strings
# "Hello, " + user input + "."
output$name <- renderText({paste0("Hello, ", input$nameInput, ".")})
}
# run the application
shinyApp(ui, server)
}