Xây dựng ứng dụng web với Shiny trong R
Kaelen Medeiros
Data Scientist
Shiny cung cấp nhiều loại nhập liệu.




selectInput("inputId",
"label",
choices = c("A", "B", "C"))
sliderInput("inputId",
"label",
value = 1925,
min = 1900,
max = 2000)
?dateRangeInput
help(checkboxInput)
ui <- fluidPage( textInput("name", "Nhập tên:"), selectInput("animal", "Chó hay mèo?", choices = c("dogs", "cats")), textOutput("greeting"), textOutput("answer") )server <- function(input, output, session) { output$greeting <- renderText({ paste("Bạn thích chó hay mèo,", input$name, "?") }) output$answer <- renderText({ paste("Tôi thích", input$animal, "!") }) }
Xây dựng ứng dụng web với Shiny trong R