Studi Kasus: Membangun Aplikasi Web dengan Shiny di R
Dean Attali
Shiny Consultant
tableOutput("table")output$table <- renderTable({ gapminder })

DT::dataTableOutput("table")output$table <- DT::renderDataTable({ gapminder })

DT::dataTableOutput("table")output$table <- DT::renderDataTable({ gapminder })

DT::dataTableOutput("table")output$table <- DT::renderDataTable({ gapminder })

DT::dataTableOutput("table")output$table <- DT::renderDataTable({ gapminder })

DT::dataTableOutput("table")output$table <- DT::renderDataTable({ gapminder })



tabPanel(title = "tab 1", "content goes here")tabPanel(title = "tab 2", "second tab", plotOutput("plot"))
fluidPage(tabsetPanel(tabPanel(title = "tab 1", "first tab content goes here"), tabPanel(title = "tab 2", "second tab", plotOutput("plot")), tabPanel(title = "tab 3", textInput("text", "Name", ""))))

Sintaks aturan CSS
#ID {
property: value;
property: value;
...
}
ID adalah ID elemen yang diberi gaya
Untuk menambahkan CSS ke Shiny, gunakan tags$style()
ui <- fluidPage(
tags$style("
#ID {
property: value;
}
")
)
ui <- fluidPage(
textInput("name", "Enter your name", "Dean"),
tableOutput("table")
)

ui <- fluidPage(
textInput("name", "Enter your name", "Dean"),
tableOutput("table")
)

ui <- fluidPage(
textInput("name", "Enter your name", "Dean"),
tableOutput("table")
)

ui <- fluidPage(
textInput("name", "Enter your name", "Dean"),
tableOutput("table")
)

css <- "#name { color: red; }#table { background: yellow; font-size: 24px; }"
ui <- fluidPage(tags$style(css),textInput("name", "Enter your name", "Dean"), tableOutput("table") )
Studi Kasus: Membangun Aplikasi Web dengan Shiny di R