如何在flexdashboard中创建js复选框?发光树不工作(R,发光)

如何在flexdashboard中创建js复选框?发光树不工作(R,发光),r,shiny,jstree,flexdashboard,shinytree,R,Shiny,Jstree,Flexdashboard,Shinytree,我在flexdashboard中使用shinyTree时遇到问题。在常规的闪亮应用程序中,效果很好: library(shiny) library(shinyTree) server <- function(input, output) { output$tree <- renderTree({ opciones = list('All'= list( 'Human' = structure(list('OP1'='OP1', 'OP2'='OP2'

我在flexdashboard中使用shinyTree时遇到问题。在常规的闪亮应用程序中,效果很好:

library(shiny)
library(shinyTree)
server <- function(input, output) {
  
  output$tree <- renderTree({
    opciones = list('All'= list( 
      'Human' =  structure(list('OP1'='OP1', 'OP2'='OP2'),stopened=TRUE),  
      'Mouse' =  structure(list('OP3'='OP3'), stopened=TRUE)))
    attr(opciones[[1]],"stopened")=TRUE
    opciones
  })
}

ui <- fluidPage(
  shinyTree("tree", checkbox = "TRUE")
)

shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(银树)

服务器jsTreeR
包可以比
shinyTree
包做得更多。而且它可以与flexdashboard配合使用:

---
标题:“无标题”
输出:
flexdashboard::flex_仪表板:
方向:列
垂直布局:填充
运行时间:闪亮
---
```{r设置,include=FALSE}
库(flexdashboard)
图书馆(闪亮)
图书馆(jsTreeR)
```
```{r}

您可以尝试
jsTreeR
而不是
shinyTree