【发布时间】:2017-10-06 01:28:41
【问题描述】:
我正在制作一个闪亮的应用程序,在该应用程序中,单击 actionButton,使用 caret 包训练模型。由于此训练需要时间 - 大约 4-5 分钟 - 我想在应用程序中显示加载标志或加载 GIF,在模型训练后显示结果。否则,用户将不知道发生了什么或模型何时被训练。
谢谢
【问题讨论】:
标签: r shiny r-caret shinydashboard
我正在制作一个闪亮的应用程序,在该应用程序中,单击 actionButton,使用 caret 包训练模型。由于此训练需要时间 - 大约 4-5 分钟 - 我想在应用程序中显示加载标志或加载 GIF,在模型训练后显示结果。否则,用户将不知道发生了什么或模型何时被训练。
谢谢
【问题讨论】:
标签: r shiny r-caret shinydashboard
您可以在 ui.R 中使用加载微调器
# loading the library
library(shinycssloaders)
withSpinner()
# For example, if you have the plot for which you would like to show loading spinner before it's gets drawn while making some data manipulation
withSpinner(plotOutput("my_plot"))
你可以在https://cran.r-project.org/web/packages/shinycssloaders/README.html找到更多信息
【讨论】:
您可以制作进度条。示例如下:
【讨论】: