I have the following code:
library(shiny)
library(shinyTree)
server <- shinyServer(function(input, output, session) {
output$level_tree <- renderTree({
list('1 level'= list(
'1.1 level' = structure(
list('1.1.1 level'='1',
'1.1.2 level'='2')),stopened=TRUE),
'1.2 level' = structure(
list('1.2.1 level'='3')),stopened=TRUE)))
})
})
ui <- shinyUI(
fluidPage(
h4('Levels'),
shinyTree("level_tree", checkbox = TRUE)
)
)
shinyApp(ui, server)
Is there any way to the add to the hierarchical tree the following levels:
1.1.1.1,
1.1.1.1.1,
1.1.1.1.1.1
I unsuccessfully tried:
list('1 level'= list(
'1.1 level' = structure(
list('1.1.1 level'=list(
'1.1.1.1 level=list(
'1.1.1.1.1'='1')),
'1.1.2 level'='2')),stopened=TRUE),
'1.2 level' = structure(
list('1.2.1 level'='3')),stopened=TRUE)))