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



ui <- fluidPage(
textInput(inputId = "name", label = "Enter your name",
value = "Dean"),
numericInput(inputId = "sibs", label = "How many siblings?",
value = 4, min = 0)
)
*Input(inputId, label, ...)inputId = 고유 IDlabel = 입력 설명 텍스트... = 입력별 추가 매개변수두 단계:
출력 자리표시자 만들기(UI)
ui <- fluidPage(
"Plot goes here:",
plotOutput(outputId = "my_plot")
)
서버에서 출력을 생성하는 R 코드 작성
server <- function(input, output) {
# Code for building outputs
}
inputoutputui <- fluidPage( numericInput("num", "Number of rows", value = 10, min = 0), tableOutput("my_table") )server <- function(input, output) { output$my_table <- renderTable({ head(iris, n = input$num) }) }
renderPlot(), renderText() 등)output$<outputId>에 저장input$<inputId>로 접근사례 연구: R의 Shiny로 웹 애플리케이션 만들기