mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-15 09:05:53 -05:00
23 lines
353 B
R
23 lines
353 B
R
library(shiny)
|
|
|
|
|
|
ui <- defineUI(
|
|
h1("Example 1: All Caps"),
|
|
p(
|
|
"Input:", br(),
|
|
input(name='val', type='text', value='Hello World!')
|
|
),
|
|
p(
|
|
"You said:", br(),
|
|
shinyText("valUpper")
|
|
)
|
|
)
|
|
|
|
app <- function(input, output) {
|
|
output$valUpper <- reactive(function() {
|
|
toupper(input$val)
|
|
})
|
|
}
|
|
|
|
runApp(client=page(ui), server=app)
|