[英]Shiny app not updating the data
I have a shiny page looking like that: 我有一个看起来像这样的闪亮页面:
library(all my required packages)
source("that file that contains a function to grab my data")
data <- function_from_sourced_file()
server <- function(input, output)
ui <- shinyUI()
shinyApp(ui = ui, server = server)
Now this works fine but I need the shiny app to reflect the changes on said data and to do so I have to either rerun the runApp()
function or :w
the app.R file in vim. 现在这可以正常工作,但是我需要闪亮的应用程序来反映上述数据的变化,为此,我必须重新运行runApp()
函数或:w
在vim中运行app.R文件。 Is it possible to ask the shiny server to rerun the entire file each it is accessed? 是否可以要求闪亮的服务器在每次访问它时重新运行整个文件?
thanks 谢谢
One of the quick ways to do so is using reactivePoll
. 一种快速的方法是使用reactivePoll
。
reactivePoll reactivePoll
A reactive expression that returns the result of valueFunc, and invalidates when checkFunc changes. 一个反应式表达式,它返回valueFunc的结果,并在checkFunc更改时无效。
Used to create a reactive data source, which works by periodically polling a non-reactive data source. 用于创建反应性数据源,该功能通过定期轮询非反应性数据源来工作。
reactivePoll and reactiveFileReader reactPoll和reactFileReader
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.