플롯을 수정하는 간단한 입력 추가

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Dean Attali

Shiny Consultant

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.003.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.004.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.005.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.006.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.007.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.008.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.009.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.010.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Gapminder 플롯 앱

chapter2_2_adding_simple_inputs_to_modify_a_plot.011.png

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

텍스트 입력

ui <- fluidPage( 
    textInput(inputId = "package", 
              label = "What's your favourite R package?",
              value = "shiny")
)

server <- function(input, output) {}
shinyApp(ui, server)

chapter2_2_adding_simple_inputs_to_modify_a_plot.012.png

str(input$package)
chr "shiny"
사례 연구: R의 Shiny로 웹 애플리케이션 만들기

숫자 입력

numericInput("years", "How many years have you been using R?",
             value = 4, min = 0, max = 25)

chapter2_2_adding_simple_inputs_to_modify_a_plot.014.png

str(input$years)
int 4
사례 연구: R의 Shiny로 웹 애플리케이션 만들기

체크박스 입력

checkboxInput("agree", "I agree to the terms and conditions",
              value = TRUE)

chapter2_2_adding_simple_inputs_to_modify_a_plot.020.png

str(input$agree)
logi TRUE
사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Let's practice!

사례 연구: R의 Shiny로 웹 애플리케이션 만들기

Preparing Video For Download...