sidebar <- dashboardSidebar(
sidebarMenu(
menuItem("Start Project", tabName = "start"),
menuItem("Calibration", tabName = "Standards")
))
body <- dashboardBody(
tabItems(
##START
tabItem("start",
numericInput("num", label = h3("Numeric input"), value = 1)
),
tabItem("Standards",
uiOutput('essai')
)
)#tabItem
)#dashboardBody
header <- dashboardHeader(
)
ui <- dashboardPage(header, sidebar, body)
server <- function(input, output, session) {
output$essai <- renderUI({
withProgress(message = 'Making plot', value = 0, {
lapply(1:input$num, function(i){
incProgress(1/input$num, detail = paste("Doing part", i))
Sys.sleep(0.02)
plotname2 <- paste("plotSession", i, sep="")
output[[plotname2]] <- renderPlot({
plot(1,1)})
box(plotOutput(plotname2))
})
})
})
}
shinyApp(ui, server)