Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 有没有办法通过编程知道shiny是否正在运行?_R_Shiny_R Markdown - Fatal编程技术网

R 有没有办法通过编程知道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

我开发了一些函数,这些函数从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 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'中有
正在运行
功能

此函数用于测试当前是否正在运行闪亮的应用程序