Creare applicazioni web con Shiny in R
Kaelen Medeiros
Data Scientist
Shiny offre vari tipi di input.




selectInput("inputId",
"label",
choices = c("A", "B", "C"))
sliderInput("inputId",
"label",
value = 1925,
min = 1900,
max = 2000)
?dateRangeInput
help(checkboxInput)
ui <- fluidPage( textInput("name", "Inserisci un nome:"), selectInput("animal", "Cani o gatti?", choices = c("dogs", "cats")), textOutput("greeting"), textOutput("answer") )server <- function(input, output, session) { output$greeting <- renderText({ paste("Preferisci cani o gatti,", input$name, "?") }) output$answer <- renderText({ paste("Io preferisco", input$animal, "!") }) }
Creare applicazioni web con Shiny in R