-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdemo.R
42 lines (40 loc) · 1011 Bytes
/
demo.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#' @import shiny
NULL
#' A test application that uses Bootstrap 2
#'
#' In this example app, functions from the shinybootstrap2 package will override
#' those from shiny.
#' @export
bs2appObj <- function() {
shinybootstrap2::withBootstrap2({
shinyApp(
ui = fluidPage(
sidebarPanel(selectInput("n", "n", c(1, 5, 10))),
mainPanel(plotOutput("plot"))
),
server = function(input, output) {
output$plot <- renderPlot({
plot(head(cars, as.numeric(input$n)))
})
}
)
})
}
#' A test application that uses Bootstrap 3
#'
#' In this example app, functions from the shiny package will be used;
#' shinybootstrap2 won't be used at all.
#' @export
bs3appObj <- function() {
shinyApp(
ui = fluidPage(
sidebarPanel(selectInput("n", "n", c(1, 5, 10))),
mainPanel(plotOutput("plot"))
),
server = function(input, output) {
output$plot <- renderPlot({
plot(head(cars, as.numeric(input$n)))
})
}
)
}