【发布时间】:2020-07-08 08:16:57
【问题描述】:
进程完成后如何移除进度条?任何人都可以帮助我。我使用 ShinyWidgets 添加了一个进度条。
界面部分
ui <- fluidPage(
column(
width = 7,
tags$b("Other options"), be(),
progressBar(
id = "pb2",
value = 0,
total = 100,
title = "",
display_pct = TRUE,
status = "custom"
),
tags$style(".progress-bar-custom {background-color: #25c484;}"),
DTOutput("intTable")
)
)
服务器部分
server <- function(input, output, session) {
adae<-read_sas("DATAPATH")## data
for (i in 1:100) {
updateProgressBar(
session = session,
id = "pb2",
value = i, total = 100
)
Sys.sleep(0.1)
}
####==Here I want to close this ProgressBar==######
output$intTable<-renderDT({adae %>%
datatable(rownames = FALSE, options = list(dom = 't', pageLength = 200))
})
}
shinyApp(ui = ui, server = server)
【问题讨论】:
标签: r shiny shinydashboard shinyapps