shinytree

shinyTree: set variable to value if checkbox is checked

三世轮回 提交于 2019-12-10 22:02:19
问题 Follow-up to shinyTree: view without selecting. library(shiny) library(shinyTree) server <- shinyServer(function(input, output, session) { 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 }) }) ui <- shinyUI( shiny::fluidPage( h4('Shiny hierarchical checkbox')

shinyTree: view without selecting

萝らか妹 提交于 2019-12-02 02:47:50
问题 Consider the following: library(shiny) library(shinyTree) server <- shinyServer(function(input, output, session) { output$tree <- renderTree({ list( 'I lorem impsum'= list( 'I.1 lorem impsum' = structure(list('I.1.1 lorem impsum'='1', 'I.1.2 lorem impsum'='2'),stselected=TRUE), 'I.2 lorem impsum' = structure(list('I.2.1 lorem impsum'='3'), stselected=TRUE))) }) }) ui <- shinyUI( shiny::fluidPage( h4('Shiny hierarchical checkbox') ,shinyTree("tree", checkbox = TRUE) ) ) shinyApp(ui, server)

R Shiny - Resetting shinyTree node selections

心不动则不痛 提交于 2019-12-02 02:13:57
问题 The app below contains a shinyTree , a reset button ( Reset nodes ) and a print output 'Selected nodes'. The print output prints the output of the get_selected function, which returns a list of selected nodes. Here is a screenshot of the tree on start-up: No nodes are selected so get_selected returns an empty list() When I make a selection, e.g. node a , the get_selected correctly returns that selection: When I click Reset nodes , the node selections are cleared in the tree UI but get