# NOT RUN {
library(shiny)
ui <- fluidPage(
use_waitress("red"), # dependencies
sliderInput("set", "percentage", 1, 100, step = 5, value = 1)
)
server <- function(input, output, session){
w <- Waitress$
new()$ # call a waitress
start() #<U+00A0>start waitress
observeEvent(input$set, {
w$set(input$set) # set at percentage
})
}
if(interactive()) shinyApp(ui, server)
## ------------------------------------------------
## Method `Waitress$new`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")
# }
# NOT RUN {
## ------------------------------------------------
## Method `Waitress$start`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")$start()
# }
# NOT RUN {
## ------------------------------------------------
## Method `Waitress$set`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")$set(20)
# }
# NOT RUN {
## ------------------------------------------------
## Method `Waitress$auto`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")$auto(20, 2000)
# }
# NOT RUN {
## ------------------------------------------------
## Method `Waitress$increase`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")$increase(30)
# }
# NOT RUN {
## ------------------------------------------------
## Method `Waitress$hide`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")$hide()
# }
# NOT RUN {
## ------------------------------------------------
## Method `Waitress$print`
## ------------------------------------------------
# }
# NOT RUN {
Waitress$new("#plot")$hide()
# }
Run the code above in your browser using DataLab