Rで作るShiny Webアプリケーション
Kaelen Medeiros
Data Scientist
Shiny には多様な入力があります。




selectInput("inputId",
"label",
choices = c("A", "B", "C"))
sliderInput("inputId",
"label",
value = 1925,
min = 1900,
max = 2000)
?dateRangeInput
help(checkboxInput)
ui <- fluidPage( textInput("name", "名前を入力:"), selectInput("animal", "犬と猫のどちら?", choices = c("dogs", "cats")), textOutput("greeting"), textOutput("answer") )server <- function(input, output, session) { output$greeting <- renderText({ paste("犬と猫のどちらが好きですか、", input$name, "?") }) output$answer <- renderText({ paste("私は", input$animal, "が好きです!") }) }
Rで作るShiny Webアプリケーション