blob: 58a860384796a864931238e95c701b17486edd7d [file] [log] [blame]
Hao Zhu014d6212017-08-07 04:20:23 +08001## ----setup, include=FALSE------------------------------------------------
2knitr::opts_chunk$set(echo = TRUE)
3
4## ---- eval = FALSE-------------------------------------------------------
5# library(shiny)
6#
7# ui <- fluidPage(
8#
9# # Application title
10# titlePanel("mtcars"),
11#
12# sidebarLayout(
13# sidebarPanel(
14# sliderInput("mpg", "mpg Limit",
15# min = 11, max = 33, value = 20)
16# ),
17#
18# mainPanel(
19# tableOutput("mtcars_kable")
20# )
21# )
22# )
23#
24# server <- function(input, output) {
25# library(dplyr)
26# library(kableExtra)
27# output$mtcars_kable <- function() {
28# req(input$mpg)
29# mtcars %>%
30# mutate(car = rownames(.)) %>%
31# select(car, everything()) %>%
32# filter(mpg <= input$mpg) %>%
33# knitr::kable("html") %>%
34# kable_styling("striped", full_width = F) %>%
35# add_header_above(c(" ", "Group 1" = 5, "Group 2" = 6))
36# }
37# }
38#
39# # Run the application
40# shinyApp(ui = ui, server = server)
41#
42#
43
44## ---- eval=FALSE---------------------------------------------------------
45# shiny::runGist("https://gist.github.com/haozhu233/9e675e1a8a1bb4744f9ebc9246a2366b")
46