사례 연구: R의 Shiny로 웹 애플리케이션 만들기
Dean Attali
Shiny Consultant
워드 클라우드를 위한 3가지 데이터 소스
artofwartextAreaInput()fileInput()다음 단계: 모두 함께 지원

radioButtons(
"time_of_day", "Choose your favorite time of day",
choices = c("Morning", "Afternoon", "Evening"),
selected = "Afternoon"
)

radioButtons(
"time_of_day", "Choose your favorite time of day",
choices = c("I'm a morning person!" = "Morning",
"Love my afternoons" = "Afternoon",
"Night owl here!" = "Evening"),
selected = "Afternoon"
)

str(input$time_of_day)
chr "Afternoon"
conditionalPanel(condition, ...)
condition은 R 코드와 유사하나, input$<id> 대신 input.<id> 사용...에는 임의의 UI 포함 가능ui <- fluidPage(
radioButtons("time_of_day",
"Choose your favorite time of day",
...),
plotOutput("morning_only_plot")
)
ui <- fluidPage(
radioButtons("time_of_day",
"Choose your favorite time of day",
...),
conditionalPanel(
condition = "input.time_of_day == 'Morning'",
plotOutput("morning_only_plot")
)
)
사례 연구: R의 Shiny로 웹 애플리케이션 만들기