R 有没有办法通过编程知道shiny是否正在运行?
我开发了一些函数,这些函数从Shiny获取R 有没有办法通过编程知道shiny是否正在运行?,r,shiny,r-markdown,R,Shiny,R Markdown,我开发了一些函数,这些函数从Shiny获取输入。然而,为了测试这些函数,我需要在没有任何提示的情况下运行它们。所以我想做一些类似的事情 --- title: "My report that prints `input` variable in both reactive and static format" # runtime: shiny # I want to be able programmatically to see when Shiny is running a
输入
。然而,为了测试这些函数,我需要在没有任何提示的情况下运行它们。所以我想做一些类似的事情
---
title: "My report that prints `input` variable in both reactive and static format"
# runtime: shiny # I want to be able programmatically to see when Shiny is running and when NOT
---
```{r}
library(shiny)
input0 <- list()
input0$typedDate <- "6/08/1935"
if (!is.shinyRunning()) {
print("Shiny is Not Running")
input <- input0
} else {
textInput("typedDate", "Enter Date:", "6 jul 1935")
}
renderPrint(input$typedDate)
---
标题:“以反应式和静态格式打印'input'变量的我的报告”
#运行时:Shinny#我希望能够通过编程看到Shinny何时运行,何时不运行
---
```{r}
图书馆(闪亮)
input0在'shinny'中有正在运行
功能
此函数用于测试当前是否正在运行闪亮的应用程序