Closed anusurendra closed 2 hours ago
You need (see doc).
useWaitress
)#hist1
)library(shiny)
ui <- navbarPage(
"Waitress on nav",
tabPanel(
"home",
useWaitress(),
p(
em("Visualization")
), br(),
p(
"Histogram of normalized raw data"
),
actionButton("render", "Render"),
plotOutput("hist1")
)
)
server <- function(input, output){
# now waitress ranges from 0 to 100
waitress <- Waitress$new("#hist1", theme = "overlay", min = 0, max = 10)
output$hist1 <- renderPlot({
input$render
on.exit(
waitress$close() # hide when done
)
for(i in 1:10){
waitress$inc(1) # increase by 10%
Sys.sleep(.5)
}
hist(runif(100))
})
}
shinyApp(ui, server)
Hi, I am not able to able to render the watiress on my histogram plot. Below is the code: