Closed shahronak47 closed 2 years ago
It looks like you are looking at a very outdated documentation. May I ask where you saw this?
See the correct code the latest version below.
library(shiny)
library(waiter)
# diagonal line
path <- "M10 10L90 30"
ui <- fluidPage(
useWaiter(),
useHostess(),
actionButton("draw", "redraw"),
plotOutput("plot")
)
server <- function(input, output) {
dataset <- reactive({
input$draw
hostess <- Hostess$new(min = 0, max = 10)
hostess$set_loader(
hostess_loader(
progress_type = "stroke",
stroke_color = hostess_stripe()
)
)
waiter <- Waiter$new(
"plot",
html = hostess$get_loader()
)
waiter$show()
for(i in 1:10){
Sys.sleep(.2)
hostess$inc(1)
}
runif(100)
})
output$plot <- renderPlot(plot(dataset()))
}
shinyApp(ui, server)
@JohnCoene I find the example under ?waiter::hostessLoader
.
Thank you.
I am trying to run the example from the help page for hostess but it is returning me an error.
This is the error.
This is my
sessionInfo()
-