shinyTree: view without selecting

前端 未结 1 1040
臣服心动
臣服心动 2021-01-21 06:50

Consider the following:

library(shiny)
library(shinyTree)
server <- shinyServer(function(input, output, session) {  
  output$tree <- renderTree({ 
    lis         


        
相关标签:
1条回答
  • 2021-01-21 07:32

    You can do it in such way :

    output$tree <- renderTree({ 
        sss=list(  'I lorem impsum'= list( 
          'I.1 lorem impsum'   =  structure(list('I.1.1 lorem impsum'='1', 'I.1.2 lorem impsum'='2'),stopened=TRUE),  
          'I.2 lorem impsum'   =  structure(list('I.2.1 lorem impsum'='3'), stopened=TRUE)))
        attr(sss[[1]],"stopened")=TRUE 
        sss
      })
    

    P.S

    Documentation is realy bad... I find stopened in shinyTree:::getJSON which used in shinyTree:::listToTags

    0 讨论(0)
提交回复
热议问题