在RMarkdown中编织闪亮的错误. appshot.shiny.appobj出错

我正在#RMarkdown上创建一个测试页面并尝试在其中添加#Shiny内容.编织到
HTML时我收到以下错误.

Error in appshot.shiny.appobj(list(httpHandler = function (req) :
appshot of Shiny app objects is not yet supported. Calls:
… in_dir -> do.call -> -> appshot.shiny.appobj Execution
halted

请帮忙.在#RMarkdown中运行闪亮应用程序需要哪些软件包?或者在#RMarkdown上成功运行#shiny应该怎么做?

下面是我的测试代码.

```{r setup, include=TRUE, echo=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(shiny)
```

```{r tabs, echo=FALSE}

shinyApp(

  ui = fluidPage(
tabsetPanel(
        id = 'dataset',
        tabPanel('diamonds', DT::dataTableOutput('mytable1')),
        tabPanel('mtcars', DT::dataTableOutput('mytable2'))
      )
),

server = function(input, output) {
},
  options = list(height = 500)
)
```

最佳答案 你需要添加到rmd的标题

runtime: shiny
点赞